diff options
author | Keith Bostic <keith@wiredtiger.com> | 2016-03-16 13:07:59 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2016-03-16 13:07:59 -0400 |
commit | c82bed6dc12e6819e73203c034191bf8a1335204 (patch) | |
tree | 3d9b00fae3894b2af6dc4e328c4c32ff525e5099 /src/packing | |
parent | 4ec307dce22f6162f3ffa7497326f743b483d7d2 (diff) | |
download | mongo-c82bed6dc12e6819e73203c034191bf8a1335204.tar.gz |
WT-2494: review calls to __wt_free, plus minor bug in an error path.
Remove checks for "pointer != NULL" before calling __wt_free(), they're
not needed.
In __wt_async_op_init(), don't bother clearing the pointer values after
calling __wt_free(), they get cleared by __wt_free().
In __lsm_tree_set_name(), don't leave the tree without a name, by freeing
the name and then failing to allocate room for the new one.
In __ckpt_last_name(), don't free the wrong pointer in the error path.
Diffstat (limited to 'src/packing')
-rw-r--r-- | src/packing/pack_stream.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/packing/pack_stream.c b/src/packing/pack_stream.c index 5716c31a9c2..1393eb9a9c1 100644 --- a/src/packing/pack_stream.c +++ b/src/packing/pack_stream.c @@ -65,8 +65,7 @@ wiredtiger_pack_close(WT_PACK_STREAM *ps, size_t *usedp) if (usedp != NULL) *usedp = WT_PTRDIFF(ps->p, ps->start); - if (ps != NULL) - __wt_free(ps->pack.session, ps); + __wt_free(ps->pack.session, ps); return (0); } |