summaryrefslogtreecommitdiff
path: root/test/recovery
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-03-11 12:17:34 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-03-11 12:17:34 -0500
commit62d8c52f06a12a371a0926529c9bc50c51542446 (patch)
tree1d66e1a907fc9edcb0bd2752c5015ceb2efc5cbf /test/recovery
parentd1a59d8d5342fcaaa194a31a60ca6c4c9c55ba43 (diff)
downloadmongo-62d8c52f06a12a371a0926529c9bc50c51542446.tar.gz
WT-2470: Coverity 1352898: Resource leak
Coverity is seeing a resource leak; minor restructing of the code to clarify that can't happen.
Diffstat (limited to 'test/recovery')
-rw-r--r--test/recovery/truncated-log.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/recovery/truncated-log.c b/test/recovery/truncated-log.c
index 23269e99d35..1227b21b0ec 100644
--- a/test/recovery/truncated-log.c
+++ b/test/recovery/truncated-log.c
@@ -156,14 +156,16 @@ fill_db(void)
"%" PRIu32 " %" PRIu32 "\n",
save_lsn.l.offset, i - 1) == -1)
testutil_die(errno, "fprintf");
- if (fclose(fp) != 0)
- testutil_die(errno, "fclose");
- abort();
+ break;
}
}
first = false;
}
}
+ if (fclose(fp) != 0)
+ testutil_die(errno, "fclose");
+ abort();
+ /* NOTREACHED */
}
extern int __wt_optind;