summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/ext
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-03-22 15:42:47 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-22 05:02:38 +0000
commitd6d9fa4de0491f3b71ae4c3dbd4b5d1c1cbcbcff (patch)
tree54cbf8710ed34579d7cca7e39e60b542f272d26a /src/third_party/wiredtiger/ext
parente83f82bd0a6d6a8e7ff7df087dc011a6c7724efe (diff)
downloadmongo-d6d9fa4de0491f3b71ae4c3dbd4b5d1c1cbcbcff.tar.gz
Import wiredtiger: 61593ced6e0b285360370ec7e7f6ccd0add4671e from branch mongodb-5.0
ref: ad3892026f..61593ced6e for: 4.9.0 WT-7328 Coverity: Multiple warnings in local_storage extension
Diffstat (limited to 'src/third_party/wiredtiger/ext')
-rw-r--r--src/third_party/wiredtiger/ext/storage_sources/local_store/local_store.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/ext/storage_sources/local_store/local_store.c b/src/third_party/wiredtiger/ext/storage_sources/local_store/local_store.c
index 86e8dad06d5..bc1837068c2 100644
--- a/src/third_party/wiredtiger/ext/storage_sources/local_store/local_store.c
+++ b/src/third_party/wiredtiger/ext/storage_sources/local_store/local_store.c
@@ -235,7 +235,7 @@ local_config_dup(LOCAL_STORAGE *local, WT_SESSION *session, WT_CONFIG_ITEM *v, c
free(p);
return (ret);
}
- (void)strncat(p, suffix, len);
+ (void)strcat(p, suffix);
*result = p;
return (0);
}
@@ -630,9 +630,10 @@ local_location_handle(WT_STORAGE_SOURCE *storage_source, WT_SESSION *session,
location->iface.close = local_location_handle_close;
*location_handlep = &location->iface;
- if (0)
+ if (0) {
err:
(void)local_location_handle_close(&location->iface, session);
+ }
if (parser != NULL)
if ((t_ret = parser->close(parser)) != 0 && ret == 0)
@@ -777,6 +778,7 @@ local_location_list_internal(WT_STORAGE_SOURCE *storage_source, WT_SESSION *sess
*countp = count;
err:
+ free(dirp);
if (ret == 0)
return (0);
@@ -917,7 +919,8 @@ local_open(WT_STORAGE_SOURCE *storage_source, WT_SESSION *session,
if (0) {
err:
- local_file_close_internal(local, session, local_fh, true);
+ if (local_fh != NULL)
+ local_file_close_internal(local, session, local_fh, true);
}
return (ret);
}
@@ -1238,6 +1241,7 @@ wiredtiger_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config)
(ret = pthread_rwlock_init(&local->flush_lock, NULL)) != 0) {
(void)local_err(local, NULL, ret, "pthread_rwlock_init");
free(local);
+ return (ret);
}
/*