projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
procd: Fix memory leaks found by cppcheck
[project/procd.git]
/
service
/
instance.c
diff --git
a/service/instance.c
b/service/instance.c
index
d75e1ab
..
8838049
100644
(file)
--- a/
service/instance.c
+++ b/
service/instance.c
@@
-263,6
+263,7
@@
instance_writepid(struct service_instance *in)
if (fprintf(_pidfile, "%d\n", in->proc.pid) < 0) {
ERROR("failed to write pidfile: %s: %d (%s)",
in->pidfile, errno, strerror(errno));
+ fclose(_pidfile);
return 2;
}
if (fclose(_pidfile)) {