summaryrefslogtreecommitdiff
path: root/daemons/lvmpolld
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2015-08-04 09:25:40 +0200
committerPeter Rajnoha <prajnoha@redhat.com>2015-08-04 09:25:47 +0200
commit46e6b2b86e58e081fa40e9cc724f09f03ecf843e (patch)
tree639ee76553082cb48fc3ef45bcf5cbe7b95b399f /daemons/lvmpolld
parent6ac5689ce4d4f86c4b3985d73a0fdb4af04c298d (diff)
downloadlvm2-46e6b2b86e58e081fa40e9cc724f09f03ecf843e.tar.gz
coverity: fix possible resource leak in lvmpolld-core
/daemons/lvmpolld/lvmpolld-core.c:573: leaked_storage: Variable "cmdargv" going out of scope leaks the storage it points to.
Diffstat (limited to 'daemons/lvmpolld')
-rw-r--r--daemons/lvmpolld/lvmpolld-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemons/lvmpolld/lvmpolld-core.c b/daemons/lvmpolld/lvmpolld-core.c
index 1da2da229..140237382 100644
--- a/daemons/lvmpolld/lvmpolld-core.c
+++ b/daemons/lvmpolld/lvmpolld-core.c
@@ -566,6 +566,8 @@ static struct lvmpolld_lv *construct_pdlv(request req, struct lvmpolld_state *ls
return NULL;
}
+ pdlv->cmdargv = cmdargv;
+
cmdenvp = cmdenvp_ctr(pdlv);
if (!cmdenvp) {
pdlv_destroy(pdlv);
@@ -573,7 +575,6 @@ static struct lvmpolld_lv *construct_pdlv(request req, struct lvmpolld_state *ls
return NULL;
}
- pdlv->cmdargv = cmdargv;
pdlv->cmdenvp = cmdenvp;
return pdlv;