diff options
author | Keith Bostic <keith@wiredtiger.com> | 2016-03-11 12:17:34 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2016-03-11 12:17:34 -0500 |
commit | 62d8c52f06a12a371a0926529c9bc50c51542446 (patch) | |
tree | 1d66e1a907fc9edcb0bd2752c5015ceb2efc5cbf /test/recovery | |
parent | d1a59d8d5342fcaaa194a31a60ca6c4c9c55ba43 (diff) | |
download | mongo-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.c | 8 |
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; |