aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--strdup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strdup.c b/strdup.c
index 0b1c8ee..4c55c66 100644
--- a/strdup.c
+++ b/strdup.c
@@ -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);