projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6bb65e
)
src/common.c: Allow the `pwbufp' argument to `getpwnam_r' to be NULL.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Sun, 1 Jul 2007 06:53:18 +0000
(08:53 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Sun, 1 Jul 2007 06:53:18 +0000
(08:53 +0200)
src/common.c
patch
|
blob
|
history
diff --git
a/src/common.c
b/src/common.c
index
6333ab7
..
9ebfe27
100644
(file)
--- a/
src/common.c
+++ b/
src/common.c
@@
-695,7
+695,8
@@
int getpwnam_r (const char *name, struct passwd *pwbuf, char *buf,
pwbuf->pw_uid = pw->pw_uid;
pwbuf->pw_gid = pw->pw_gid;
- *pwbufp = pwbuf;
+ if (pwbufp != NULL)
+ *pwbufp = pwbuf;
} while (0);
pthread_mutex_unlock (&getpwnam_r_lock);