projects
/
oweals
/
tinc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix a few more issues found by Coverity.
[oweals/tinc.git]
/
src
/
xmalloc.c
diff --git
a/src/xmalloc.c
b/src/xmalloc.c
index a6874332091f1685ba14f863b19ca0d286ecfc77..39dc03c7229d79d7d321781ba78283fd1ea4f59e 100644
(file)
--- a/
src/xmalloc.c
+++ b/
src/xmalloc.c
@@
-113,9
+113,12
@@
char *xstrdup(const char *s)
{
char *p;
+ if(!s)
+ return NULL;
+
p = strdup(s);
if(!p)
- xalloc_fail (
s ? (int)strlen(s) : 0
);
+ xalloc_fail (
(int)strlen(s)
);
return p;
}