projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ea4922c
)
r225: Fix null pointer, patch by Johan Myreen
author
yoe <yoe>
Wed, 27 Dec 2006 13:46:26 +0000
(13:46 +0000)
committer
yoe <yoe>
Wed, 27 Dec 2006 13:46:26 +0000
(13:46 +0000)
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.c
b/nbd-server.c
index
986aa4b
..
3e6801a
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-1292,7
+1292,7
@@
void daemonize(SERVER* serve) {
strncpy(pidftemplate, "/var/run/server.pid", 255);
}
}
- snprintf(pidfname, 255, pidftemplate, serve->port);
+ snprintf(pidfname, 255, pidftemplate, serve ? serve->port : 0);
pidf=fopen(pidfname, "w");
if(pidf) {
fprintf(pidf,"%d\n", (int)getpid());