diff options
-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); |