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