projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b7a001
)
daemon: Fix segfault in read_pidfile() when pidfile does not exist.
author
Ben Pfaff
<blp@nicira.com>
Wed, 21 Jan 2009 00:33:32 +0000
(16:33 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Wed, 21 Jan 2009 00:44:14 +0000
(16:44 -0800)
lib/daemon.c
patch
|
blob
|
history
diff --git
a/lib/daemon.c
b/lib/daemon.c
index 4d7b044b0f2e913c4a1eb20fa2020ac7d2043011..a3b824e6a9ef4b048f88e2bbbea154e1b52fccef 100644
(file)
--- a/
lib/daemon.c
+++ b/
lib/daemon.c
@@
-294,6
+294,8
@@
read_pidfile(const char *pidfile)
return lck.l_pid;
error:
- fclose(file);
+ if (file) {
+ fclose(file);
+ }
return -error;
}