diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2016-01-27 10:51:42 -0500 |
---|---|---|
committer | Keith Bostic <keith.bostic@mongodb.com> | 2016-01-27 10:51:42 -0500 |
commit | 7fea169e425b2a56d88351f362d746d5b5dd77f5 (patch) | |
tree | fa946a54f0041846e54bcc7ae23a709af0944177 | |
parent | 53c5f38366e6d41ca0823f7d3c1457563b4390f5 (diff) | |
parent | 2838f6de01680ec7c14546ca6dd9a9755924828c (diff) | |
download | mongo-7fea169e425b2a56d88351f362d746d5b5dd77f5.tar.gz |
Merge pull request #2463 from wiredtiger/WT-2355mongodb-3.3.1
WT-2355 Use wt_buf_grow instead of free/alloc for scratch buffer.
-rw-r--r-- | src/log/log.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/log/log.c b/src/log/log.c index 9c3269c474c..3bf04d025d8 100644 --- a/src/log/log.c +++ b/src/log/log.c @@ -669,8 +669,7 @@ __log_openfile(WT_SESSION_IMPL *session, * check that the magic number and versions are correct. */ if (!ok_create) { - __wt_scr_free(session, &buf); - WT_ERR(__wt_scr_alloc(session, allocsize, &buf)); + WT_ERR(__wt_buf_grow(session, buf, allocsize)); memset(buf->mem, 0, allocsize); WT_ERR(__wt_read(session, *fh, 0, allocsize, buf->mem)); logrec = (WT_LOG_RECORD *)buf->mem; |