ccanlint: Fix leak in do_reduce_features()
authorDavid Gibson <david@gibson.dropbear.id.au>
Sun, 2 Apr 2017 11:29:24 +0000 (21:29 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 5 Apr 2017 05:56:33 +0000 (15:56 +1000)
options_avail and options_used get freed, but options does not.

Found by Coverity scan.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
tools/ccanlint/tests/reduce_features.c

index b49922b5d11b27b310b0b843870ee2be8310ed4a..34a897061bb4fbe16c69800bf699f930d753502b 100644 (file)
@@ -181,6 +181,7 @@ static void do_reduce_features(struct manifest *m,
                err(1, "Creating reduced-features/config.h");
        if (!write_all(fd, hdr, strlen(hdr)))
                err(1, "Writing reduced-features/config.h");
+       htable_option_free(options);
        close(fd);
        features_were_reduced = true;
 }