]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/reduce_features.c
fdpass: fix complilation on FreeBSD.
[ccan] / tools / ccanlint / tests / reduce_features.c
index b49922b5d11b27b310b0b843870ee2be8310ed4a..89e615957010908ea3aa9070f75077126ae1feb8 100644 (file)
@@ -37,7 +37,8 @@ static bool option_cmp(const char *name1, const char *name2)
        return streq(name1, name2);
 }
 
-HTABLE_DEFINE_TYPE(char, option_name, option_hash, option_cmp, htable_option);
+HTABLE_DEFINE_NODUPS_TYPE(char, option_name, option_hash, option_cmp,
+                         htable_option);
 
 static struct htable_option *htable_option_new(void)
 {
@@ -181,6 +182,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;
 }