summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/meta/meta_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/meta/meta_table.c')
-rw-r--r--src/third_party/wiredtiger/src/meta/meta_table.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/src/meta/meta_table.c b/src/third_party/wiredtiger/src/meta/meta_table.c
index 76f4ef0c25f..4f60728b2d2 100644
--- a/src/third_party/wiredtiger/src/meta/meta_table.c
+++ b/src/third_party/wiredtiger/src/meta/meta_table.c
@@ -195,7 +195,7 @@ __wt_metadata_update(
__metadata_turtle(key) ? "" : "not ");
if (__metadata_turtle(key)) {
- WT_WITH_TURTLE_LOCK(session, ret,
+ WT_WITH_TURTLE_LOCK(session,
ret = __wt_turtle_update(session, key, value));
return (ret);
}
@@ -262,8 +262,17 @@ __wt_metadata_search(WT_SESSION_IMPL *session, const char *key, char **valuep)
key, WT_META_TRACKING(session) ? "true" : "false",
__metadata_turtle(key) ? "" : "not ");
- if (__metadata_turtle(key))
- return (__wt_turtle_read(session, key, valuep));
+ if (__metadata_turtle(key)) {
+ /*
+ * The returned value should only be set if ret is non-zero, but
+ * Coverity is convinced otherwise. The code path is used enough
+ * that Coverity complains a lot, add an error check to get some
+ * peace and quiet.
+ */
+ if ((ret = __wt_turtle_read(session, key, valuep)) != 0)
+ __wt_free(session, *valuep);
+ return (ret);
+ }
/*
* All metadata reads are at read-uncommitted isolation. That's