]> git.marmaro.de Git - mmh/blobdiff - sbr/strdup.c
* man/mhbuild.man: wrapped one appearance of "Content-Disposition"
[mmh] / sbr / strdup.c
index 486b36a86dcee164fc1c8ac810aac88cff446c42..ebc29f59a4eaaba07636ab4aed3ab8e94707e7a0 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <h/mh.h>
+#include <h/utils.h>
 
 
 char *
@@ -22,8 +23,7 @@ strdup (const char *str)
        return NULL;
 
     len = strlen(str) + 1;
-    if (!(cp = malloc (len)))
-       return NULL;
+    cp = mh_xmalloc (len);
     memcpy (cp, str, len);
     return cp;
 }