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:
parent
0ee9613d98
commit
4d5e13a125
Notes:
Lennart Poettering
2014-10-24 18:17:10 +02:00
Backport: bugfix
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user