summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/bench
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-05-18 15:10:02 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-05-18 15:10:02 +1000
commit4f0e70b66182cbb872c4e5eefda23f1c58bdaab7 (patch)
treea32874e94f24d545e205e05d71916877525f85a7 /src/third_party/wiredtiger/bench
parent727c1dc8ce2df4e44516e1527d917294f7c45558 (diff)
downloadmongo-4f0e70b66182cbb872c4e5eefda23f1c58bdaab7.tar.gz
Import wiredtiger-wiredtiger-2.6.0-19-g35cc116.tar.gz from wiredtiger branch mongodb-3.2
Diffstat (limited to 'src/third_party/wiredtiger/bench')
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/config.c9
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/wtperf.c6
2 files changed, 5 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/bench/wtperf/config.c b/src/third_party/wiredtiger/bench/wtperf/config.c
index 634391a9d27..47e052d6055 100644
--- a/src/third_party/wiredtiger/bench/wtperf/config.c
+++ b/src/third_party/wiredtiger/bench/wtperf/config.c
@@ -113,10 +113,8 @@ config_free(CONFIG *cfg)
config_opts[i].type == CONFIG_STRING_TYPE) {
pstr = (char **)
((unsigned char *)cfg + config_opts[i].offset);
- if (*pstr != NULL) {
- free(*pstr);
- *pstr = NULL;
- }
+ free(*pstr);
+ *pstr = NULL;
}
if (cfg->uris != NULL) {
for (i = 0; i < cfg->table_count; i++)
@@ -513,8 +511,7 @@ config_opt_file(CONFIG *cfg, const char *filename)
err: if (fd != -1)
(void)close(fd);
- if (file_buf != NULL)
- free(file_buf);
+ free(file_buf);
return (ret);
}
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf.c b/src/third_party/wiredtiger/bench/wtperf/wtperf.c
index 8c5e6ba8060..3a2e1709ddc 100644
--- a/src/third_party/wiredtiger/bench/wtperf/wtperf.c
+++ b/src/third_party/wiredtiger/bench/wtperf/wtperf.c
@@ -655,8 +655,7 @@ op_err: lprintf(cfg, ret, 0,
if (0) {
err: cfg->error = cfg->stop = 1;
}
- if (cursors != NULL)
- free(cursors);
+ free(cursors);
return (NULL);
}
@@ -920,8 +919,7 @@ populate_thread(void *arg)
if (0) {
err: cfg->error = cfg->stop = 1;
}
- if (cursors != NULL)
- free(cursors);
+ free(cursors);
return (NULL);
}