Fix a few more issues found by Coverity.
[tinc] / src / xmalloc.c
index 1e40017..a687433 100644 (file)
@@ -115,7 +115,7 @@ char *xstrdup(const char *s)
   
   p = strdup(s);
   if(!p)
-    xalloc_fail ((int)strlen(s));
+    xalloc_fail (s ? (int)strlen(s) : 0);
   return p;
 }