Fix a few more issues found by Coverity.
[tinc] / src / xmalloc.c
index 1e40017..39dc03c 100644 (file)
@@ -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));