From 45e64e9fbeae206997d347b479e697da2ee53ac5 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Wed, 11 Nov 2015 17:01:28 +1100 Subject: discover: Add two missing talloc_free()s Fixes Coverity defects #30474 and #30475 Signed-off-by: Samuel Mendoza-Jonas --- discover/dt.c | 1 + discover/parser.c | 1 + 2 files changed, 2 insertions(+) (limited to 'discover') diff --git a/discover/dt.c b/discover/dt.c index a7383e1..e7214e0 100644 --- a/discover/dt.c +++ b/discover/dt.c @@ -56,6 +56,7 @@ int get_ipmi_sensor(void *t, enum ipmi_sensor_ids sensor_id) rc = __be32_to_cpu(*(uint32_t *)buf); out: + talloc_free(buf); free(namelist); return rc; } diff --git a/discover/parser.c b/discover/parser.c index 7833981..8e767c6 100644 --- a/discover/parser.c +++ b/discover/parser.c @@ -62,6 +62,7 @@ int parser_check_dir(struct discover_context *ctx, path = local_path(ctx, dev, dirname); rc = stat(path, &statbuf); + talloc_free(path); if (!rc) return -1; -- cgit v1.2.1