From e9c7be0e32e6ddaf40f73fd0ea1977a295842aec Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 17 Jan 2020 21:08:10 -0800 Subject: [PATCH] pmemblk: Fix a memory leak 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 --- engines/pmemblk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/pmemblk.c b/engines/pmemblk.c index 45f6fb65..730f4d77 100644 --- 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: -- 2.25.1