service->path = fpath;
r = hashmap_put(all_services, service->name, service);
- if (r < 0)
+ if (r < 0) {
+ free(service);
return log_oom();
+ }
name = fpath = NULL;
}
q = load_sysv(service);
if (q < 0)
continue;
+ }
+ HASHMAP_FOREACH(service, all_services, j) {
q = fix_order(service, all_services);
if (q < 0)
continue;