diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-02-05 19:55:36 -0500 |
---|---|---|
committer | Sulabh Mahajan <sulabh.mahajan@mongodb.com> | 2017-02-06 11:55:36 +1100 |
commit | b2173f8f063b1528dcd086f00ca8cf072f0445d0 (patch) | |
tree | 4db55c85b9ced4d700e620703898f95ba9e58eeb /bench | |
parent | de3424c0bca2d7660acaff17383e05849d164a16 (diff) | |
download | mongo-b2173f8f063b1528dcd086f00ca8cf072f0445d0.tar.gz |
WT-3111 util_create() doesnt free memory assigned to "uri" (#3279)
Always print an error message if a WT_SESSION method fails, we don't
know if the WiredTiger library printed out a message or not.
Free memory allocated by util_uri() in some cases where we either didn't
have the necessary free call, or simply returned without freeing memory.
Try and be more consistent with error messages, use the leading call as
the first string, and any arguments to that call as the second.
Replace some of the places we're writing to stderr explicitly with the
utility error handlers.
Initialize the return variable from util_uri() in all cases.
Change error messages that referenced WT_SESSION.open to reference
WT_SESSION.open_cursor.
Diffstat (limited to 'bench')
-rw-r--r-- | bench/wtperf/wtperf.c | 2 | ||||
-rw-r--r-- | bench/wtperf/wtperf.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c index 044fd38dc06..7f5e5ad3373 100644 --- a/bench/wtperf/wtperf.c +++ b/bench/wtperf/wtperf.c @@ -2905,7 +2905,7 @@ wtperf_rand(WTPERF_THREAD *thread) * If we have a random cursor set up then use it. */ if ((rnd_cursor = thread->rand_cursor) != NULL) { - if ((ret = rnd_cursor->next(rnd_cursor))) { + if ((ret = rnd_cursor->next(rnd_cursor)) != 0) { lprintf(wtperf, ret, 0, "worker: rand next failed"); /* 0 is outside the expected range. */ return (0); diff --git a/bench/wtperf/wtperf.h b/bench/wtperf/wtperf.h index db88d0b0271..3efb8ab700e 100644 --- a/bench/wtperf/wtperf.h +++ b/bench/wtperf/wtperf.h @@ -245,7 +245,6 @@ struct __wtperf_thread { /* Per-thread structure */ TRACK ckpt; /* Checkpoint operations */ TRACK insert; /* Insert operations */ TRACK read; /* Read operations */ - TRACK scan; /* Scan operations */ TRACK update; /* Update operations */ TRACK truncate; /* Truncate operations */ TRACK truncate_sleep; /* Truncate sleep operations */ |