X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fxmalloc.c;h=39dc03c7229d79d7d321781ba78283fd1ea4f59e;hp=1e4001738aca3b59a2408759d23a199607019c12;hb=dc26ecc28046d9f3cb56f10b22636d04218ad545;hpb=68f4ca711593416d0defd81199b176ba604c6cb1 diff --git a/src/xmalloc.c b/src/xmalloc.c index 1e400173..39dc03c7 100644 --- a/src/xmalloc.c +++ b/src/xmalloc.c @@ -113,6 +113,9 @@ char *xstrdup(const char *s) { char *p; + if(!s) + return NULL; + p = strdup(s); if(!p) xalloc_fail ((int)strlen(s));