diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-13 12:35:06 +0200 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-13 12:38:39 +0200 |
commit | 4d5e13a125cf8d77d432225ab69826caa1d1cf59 (patch) | |
tree | 9d3c49846927477e82e4d6970394e9cbe14c894c /src/core/load-fragment.c | |
parent | 0ee9613d98cbe1f36ffc98c6bfa51dd2b798fc6d (diff) |
core: fix a potential mem leak
Found with Coverity. Fixes: CID#996438
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r-- | src/core/load-fragment.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 2f3acd7cbe..78da23ea57 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -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; |