--- xmalloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmalloc.c b/xmalloc.c index 45ff57b1..b77f6910 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -91,6 +91,9 @@ xreallocarray(void *ptr, size_t nmemb, size_t size) char * xstrdup(const char *str) { + if (!str) + return NULL; + char *p = strdup(str); if (!p) -- 2.11.0
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel