mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
service_register(): Fix possible memory leak, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
91b3e5eeb4
commit
e8f26709e2
1 file changed
+1
@@ -643,6 +643,7 @@ recreate:
|
|||||||
svc = svc_new(cmd, id, type);
|
svc = svc_new(cmd, id, type);
|
||||||
if (!svc) {
|
if (!svc) {
|
||||||
_e("Out of memory, cannot register service %s", cmd);
|
_e("Out of memory, cannot register service %s", cmd);
|
||||||
|
free(line);
|
||||||
return errno = ENOMEM;
|
return errno = ENOMEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user