summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/format/config.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/format/config.c b/test/format/config.c
index 1f9e2e1b353..1fe50759a95 100644
--- a/test/format/config.c
+++ b/test/format/config.c
@@ -623,6 +623,15 @@ config_single(const char *s, int perm)
exit(EXIT_FAILURE);
}
+ /*
+ * Free the previous setting if a configuration has been
+ * passed in twice.
+ */
+ if (*cp->vstr != NULL) {
+ free(*cp->vstr);
+ *cp->vstr = NULL;
+ }
+
if (strncmp(s, "checksum", strlen("checksum")) == 0) {
config_map_checksum(ep, &g.c_checksum_flag);
*cp->vstr = strdup(ep);