1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-14 15:21:37 +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);
if (!v)
if (!v) {
if (c)
free(c);
return log_oom();
}
v->base = b;
v->value = u;