summaryrefslogtreecommitdiffstats
path: root/discover
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-11-11 17:01:28 +1100
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-12-18 11:15:58 +1100
commit45e64e9fbeae206997d347b479e697da2ee53ac5 (patch)
treee6869b9e56183355d0aed747a3a4f8f4c6733925 /discover
parent8cfcec4279b229dacfb0589bc443f8a4cbd83082 (diff)
downloadtalos-petitboot-45e64e9fbeae206997d347b479e697da2ee53ac5.tar.gz
talos-petitboot-45e64e9fbeae206997d347b479e697da2ee53ac5.zip
discover: Add two missing talloc_free()s
Fixes Coverity defects #30474 and #30475 Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'discover')
-rw-r--r--discover/dt.c1
-rw-r--r--discover/parser.c1
2 files changed, 2 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud