projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
655ca10
)
pmemblk: Fix a memory leak
author
Bart Van Assche
<bvanassche@acm.org>
Sat, 18 Jan 2020 05:08:10 +0000
(21:08 -0800)
committer
Bart Van Assche
<bvanassche@acm.org>
Sat, 18 Jan 2020 06:04:39 +0000
(22:04 -0800)
This patch fixes the following Coverity complaint:
CID 169312 (#1 of 1): Resource leak (RESOURCE_LEAK)
5. leaked_storage: Variable path going out of scope leaks the storage it points to.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
engines/pmemblk.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/pmemblk.c
b/engines/pmemblk.c
index 45f6fb6501a216b78dbfdae34f7ef3807aa77669..730f4d776f1eb46d8bbfc792ed87b103c078641b 100644
(file)
--- a/
engines/pmemblk.c
+++ b/
engines/pmemblk.c
@@
-226,6
+226,8
@@
static fio_pmemblk_file_t pmb_open(const char *pathspec, int flags)
pthread_mutex_unlock(&CacheLock);
+ free(path);
+
return pmb;
error: