diff options
author | Mattias Andrée <maandree@kth.se> | 2021-12-10 21:20:48 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-12-10 21:23:29 +0100 |
commit | 6f221af77aa5aff04907e70f45bc1859a8e1cb19 (patch) | |
tree | 5459d25c0f3e306109f7a074dc3fb0f20d149331 | |
parent | Fix unsetenv (diff) | |
download | liberror-libc-6f221af77aa5aff04907e70f45bc1859a8e1cb19.tar.gz liberror-libc-6f221af77aa5aff04907e70f45bc1859a8e1cb19.tar.bz2 liberror-libc-6f221af77aa5aff04907e70f45bc1859a8e1cb19.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | strdup.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5,7 +5,7 @@ void liberror_strdup_failed(const char *s) { - liberror_set_error_errno(errno == ENOMEM ? "Out of memory" : "", "strdup", errno); + liberror_set_error_errno("", "strdup", errno); (void) s; } @@ -13,7 +13,7 @@ liberror_strdup_failed(const char *s) char * liberror_strdup(const char *s) { - char *ret = malloc(s); + char *ret = strdup(s); if (ret) return ret; liberror_save_backtrace(NULL); |