diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-13 12:35:06 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-26 18:23:45 -0400 |
commit | f9a500bd5b41e796a19492dbbf4922bb8e3c2c89 (patch) | |
tree | 7071da1507ae8b471ffa614dd5e4a768b59b0c6e | |
parent | a630a10d74f1f28dc8668876dadf526db36b9fe3 (diff) |
core: fix a potential mem leak
Found with Coverity. Fixes: CID#996438
(cherry picked from commit 4d5e13a125cf8d77d432225ab69826caa1d1cf59)
-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 45b36b97c..2b736af4e 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -1191,8 +1191,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->clock_id = id; |