diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-12-12 16:35:56 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-12-12 16:35:56 -0500 |
commit | 150fccab35fd67b24b2946361b343f75ecc2e240 (patch) | |
tree | af6058ca5388b01b07786bb259a8994d9ebb1172 | |
parent | af643876886711f516630b99c0fd43ad45929a09 (diff) | |
download | mongo-150fccab35fd67b24b2946361b343f75ecc2e240.tar.gz |
Free scratch buffer with scr_free instead of buf_free
-rw-r--r-- | src/os_win/os_dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os_win/os_dir.c b/src/os_win/os_dir.c index 076c64670d4..ab332e01186 100644 --- a/src/os_win/os_dir.c +++ b/src/os_win/os_dir.c @@ -38,7 +38,7 @@ __wt_dirlist(WT_SESSION_IMPL *session, const char *dir, const char *prefix, path[pathlen - 1] = '\0'; } - WT_ERR(__wt_scr_alloc(session, 0, &pathbuf)); + WT_ERR(__wt_scr_alloc(session, pathlen + 3, &pathbuf)); WT_ERR(__wt_buf_fmt(session, pathbuf, "%s\\*", path)); dirallocsz = 0; @@ -96,7 +96,7 @@ err: if (findhandle != INVALID_HANDLE_VALUE) (void)FindClose(findhandle); __wt_free(session, path); - __wt_buf_free(session, pathbuf); + __wt_scr_free(&pathbuf); if (ret == 0) return (0); |