summaryrefslogtreecommitdiff
path: root/src/os_posix
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2016-03-31 15:06:14 +1100
committerAlex Gorrod <alexg@wiredtiger.com>2016-03-31 15:06:14 +1100
commitfcce4239d9171fe0b3c58e9d04e7373741a6d26c (patch)
tree48ecdaf9829714b452693363177b7f54a6bad5c3 /src/os_posix
parent689c0b58ad1d8a2205967bd193a81e03516f46e4 (diff)
downloadmongo-fcce4239d9171fe0b3c58e9d04e7373741a6d26c.tar.gz
WT-2330 Free memory in __wt_directory_sync
Diffstat (limited to 'src/os_posix')
-rw-r--r--src/os_posix/os_fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_posix/os_fs.c b/src/os_posix/os_fs.c
index 2d0bee7ae05..7f38464e175 100644
--- a/src/os_posix/os_fs.c
+++ b/src/os_posix/os_fs.c
@@ -106,13 +106,14 @@ __posix_directory_sync(WT_SESSION_IMPL *session, const char *path)
WT_SYSCALL_RETRY((
(fd = open(path, O_RDONLY, 0444)) == -1 ? 1 : 0), ret);
if (ret != 0)
- WT_RET_MSG(session, ret, "%s: directory-sync: open", path);
+ WT_ERR_MSG(session, ret, "%s: directory-sync: open", path);
ret = __posix_sync(session, fd, path, "directory-sync", true);
WT_SYSCALL_RETRY(close(fd), tret);
if (tret != 0)
__wt_err(session, tret, "%s: directory-sync: close", path);
+err: __wt_free(session, copy);
return (ret == 0 ? tret : ret);
#else
WT_UNUSED(session);