discover: Add two missing talloc_free()s
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Wed, 11 Nov 2015 06:01:28 +0000 (17:01 +1100)
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Fri, 18 Dec 2015 00:15:58 +0000 (11:15 +1100)
Fixes Coverity defects #30474 and #30475

Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
discover/dt.c
discover/parser.c

index a7383e145a626c3b15af76ac083d7059d43aa4fc..e7214e04a499166539e5c7f20e959bf9bfd59164 100644 (file)
@@ -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;
 }
index 7833981ae3785d11aa072066f4aa834ae3a4acbc..8e767c6727c27f00ddc1ecb5ecaf173d288fdd60 100644 (file)
@@ -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;