[systemd-commits] 2 commits - src/analyze src/core
Thomas H.P. Andersen
phomes at kemper.freedesktop.org
Sat Sep 13 03:39:19 PDT 2014
src/analyze/analyze.c | 3 ++-
src/core/load-fragment.c | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 4d5e13a125cf8d77d432225ab69826caa1d1cf59
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Sat Sep 13 12:35:06 2014 +0200
core: fix a potential mem leak
Found with Coverity. Fixes: CID#996438
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 2f3acd7..78da23e 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;
commit 0ee9613d98cbe1f36ffc98c6bfa51dd2b798fc6d
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Sat Sep 13 12:29:43 2014 +0200
analyze: fix mem leak
Found with Coverity. Fixes: CID#1237756
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 1281d6b..82f5cf3 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -848,7 +848,8 @@ static int list_dependencies(sd_bus *bus, const char *name) {
char ts[FORMAT_TIMESPAN_MAX];
struct unit_times *times;
int r;
- const char *path, *id;
+ const char *id;
+ _cleanup_free_ char *path = NULL;
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
struct boot_times *boot;
More information about the systemd-commits
mailing list