summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-11-15 20:13:29 -0500
committerKeith Bostic <keith@wiredtiger.com>2013-11-15 20:13:29 -0500
commitc355998f1b2ad3b652222d9b066ae7465c7633cf (patch)
treea68f3c19fa4682737cd21b3a4bc7aceff4615ade
parentd4a7201badda8758f5a35d25926a980dd5260d31 (diff)
downloadmongo-c355998f1b2ad3b652222d9b066ae7465c7633cf.tar.gz
Coverity: Resource leak (RESOURCE_LEAK)
9. leaked_storage: Variable "path" going out of scope leaks the storage it points to. Don't return after allocating the path.
-rw-r--r--src/os_posix/os_dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_posix/os_dir.c b/src/os_posix/os_dir.c
index 3c336e1ab9f..3748c7480ea 100644
--- a/src/os_posix/os_dir.c
+++ b/src/os_posix/os_dir.c
@@ -37,7 +37,8 @@ __wt_dirlist(WT_SESSION_IMPL *session, const char *dir, const char *prefix,
entries = NULL;
if (flags == 0)
LF_SET(WT_DIRLIST_INCLUDE);
- WT_VERBOSE_RET(session, fileops, "wt_dirlist of %s %s prefix %s",
+
+ WT_VERBOSE_ERR(session, fileops, "wt_dirlist of %s %s prefix %s",
path, LF_ISSET(WT_DIRLIST_INCLUDE) ? "include" : "exclude",
prefix == NULL ? "all" : prefix);