]> tinc-vpn.org Git - tinc/blobdiff - src/xmalloc.c
Fix a few more issues found by Coverity.
[tinc] / src / xmalloc.c
index 1e4001738aca3b59a2408759d23a199607019c12..a6874332091f1685ba14f863b19ca0d286ecfc77 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;
 }