Skip to content

Commit 8d3d848

Browse files
authored
Merge pull request pmem#5534 from wlemkows/coverity-issues
common: fix coverity issue
2 parents eeb79f7 + d1fd190 commit 8d3d848

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/tools/pmempool/common.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: BSD-3-Clause
2-
/* Copyright 2014-2022, Intel Corporation */
2+
/* Copyright 2014-2023, Intel Corporation */
33

44
/*
55
* common.c -- definitions of common functions
@@ -1375,8 +1375,13 @@ util_pool_clear_badblocks(const char *path, int create)
13751375
outv_err("clearing bad blocks in the pool set failed -- '%s'",
13761376
path);
13771377
errno = EIO;
1378-
return -1;
1378+
ret = -1;
1379+
goto err;
13791380
}
13801381

1381-
return 0;
1382+
ret = 0;
1383+
1384+
err:
1385+
util_poolset_free(setp);
1386+
return ret;
13821387
}

0 commit comments

Comments
 (0)