projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5835a87
)
Assure that `sstrdup' works with NULL-pointers
author
octo
<octo>
Fri, 10 Mar 2006 11:16:21 +0000
(11:16 +0000)
committer
octo
<octo>
Fri, 10 Mar 2006 11:16:21 +0000
(11:16 +0000)
src/common.c
patch
|
blob
|
history
diff --git
a/src/common.c
b/src/common.c
index
43a51a5
..
50a563a
100644
(file)
--- a/
src/common.c
+++ b/
src/common.c
@@
-56,6
+56,9
@@
char *sstrdup (const char *s)
{
char *r;
+ if (s == NULL)
+ return (NULL);
+
if((r = strdup (s)) == NULL)
{
DBG ("Not enough memory.");