summaryrefslogtreecommitdiff
path: root/test/format
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2016-04-22 01:50:07 +0000
committerAlex Gorrod <alexg@wiredtiger.com>2016-04-22 01:50:07 +0000
commitcda4840c4ba7ce44bca6c4390061b02d4a3de522 (patch)
tree50c4434c79e83f8deefbdc25a9f9ac1731c2324c /test/format
parentc899852feaadf812b64c15b6b6950d46e692da0a (diff)
downloadmongo-cda4840c4ba7ce44bca6c4390061b02d4a3de522.tar.gz
Clear pointer after freeing memory.
Diffstat (limited to 'test/format')
-rw-r--r--test/format/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/format/config.c b/test/format/config.c
index c3694af675e..3efbe9aeb6a 100644
--- a/test/format/config.c
+++ b/test/format/config.c
@@ -627,8 +627,10 @@ config_single(const char *s, int perm)
* Free the previous setting if a configuration has been
* passed in twice.
*/
- if (*cp->vstr != NULL)
+ 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);