diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-05-27 09:38:44 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-05-27 09:38:44 -0400 |
commit | c8a6273a869fe9aa74db51f14cb0ca3263627629 (patch) | |
tree | 44e7dbb0648871fcfc247978554aa719e673a77f | |
parent | 6d7fd7469a26a976b2be96d83a0cec47e2f8701a (diff) | |
download | mongo-c8a6273a869fe9aa74db51f14cb0ca3263627629.tar.gz |
path variable no longer used, don't return without freeing the scratch buffer.
-rw-r--r-- | src/cursor/cur_backup.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/cursor/cur_backup.c b/src/cursor/cur_backup.c index 8425edfbe72..30d7ced886b 100644 --- a/src/cursor/cur_backup.c +++ b/src/cursor/cur_backup.c @@ -340,12 +340,9 @@ __backup_uri(WT_SESSION_IMPL *session, WT_DECL_ITEM(tmp); WT_DECL_RET; int target_list; - const char *path, *uri; + const char *uri; - *foundp = 0; - - path = NULL; - target_list = 0; + *foundp = target_list = 0; /* * If we find a non-empty target configuration string, we have a job, @@ -368,7 +365,7 @@ __backup_uri(WT_SESSION_IMPL *session, "%s: invalid backup target: URIs may need quoting", uri); - WT_RET(__wt_schema_worker( + WT_ERR(__wt_schema_worker( session, uri, __wt_backup_list_append, cfg, 0)); } WT_ERR_NOTFOUND_OK(ret); @@ -379,9 +376,7 @@ __backup_uri(WT_SESSION_IMPL *session, WT_ERR(__backup_list_append(session, cb, WT_METADATA_BACKUP)); WT_ERR(__backup_list_append(session, cb, WT_SINGLETHREAD)); -err: if (path != NULL) - __wt_free(session, path); - __wt_scr_free(&tmp); +err: __wt_scr_free(&tmp); return (ret); } |