service_register(): Fix possible memory leak, found by Coverity Scan

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-18 22:41:13 +02:00
parent 91b3e5eeb4
commit e8f26709e2
+1
View File
@@ -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;
}
}