1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-15 07:24:00 +03:00

core: fix a potential mem leak

Found with Coverity. Fixes: CID#996438
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2014-09-13 12:35:06 +02:00
parent 0ee9613d98
commit 4d5e13a125
Notes: Lennart Poettering 2014-10-24 18:17:10 +02:00
Backport: bugfix

View File

@ -1367,8 +1367,11 @@ int config_parse_timer(const char *unit,
} }
v = new0(TimerValue, 1); v = new0(TimerValue, 1);
if (!v) if (!v) {
if (c)
free(c);
return log_oom(); return log_oom();
}
v->base = b; v->base = b;
v->value = u; v->value = u;