utf8: don't allow NUL in decoded strings.
[ccan] / tools / ccanlint / tests / reduce_features.c
index b46c85fcfef081c685c74f673436f12d39e9ab28..34a897061bb4fbe16c69800bf699f930d753502b 100644 (file)
@@ -130,7 +130,8 @@ static struct htable_option *get_config_options(struct manifest *m)
 }
 
 static void do_reduce_features(struct manifest *m,
-                              unsigned int *timeleft, struct score *score)
+                              unsigned int *timeleft UNNEEDED,
+                              struct score *score)
 {
        struct htable_option *options_used, *options_avail, *options;
        struct htable_option_iter i;
@@ -180,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;
 }