Skip to contentSkip to conversation

master - cov: dm node message fix missing initilization

PATCH Zdenek Kabelac 1 participant 1 message Oct 15, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cbbdace00610ae25a5db8a7156b7d3a2779e4e0b
Commit:        cbbdace00610ae25a5db8a7156b7d3a2779e4e0b
Parent:        253989ecd953b1afcaea43fa0515c55bc6533cd2
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Oct 15 15:24:51 2018 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Oct 15 17:49:44 2018 +0200

cov: dm node message fix missing initilization

In 2 teoretical error path the 'r' value has not been set to proper value before possible use in error path.

---
 device_mapper/libdm-deptree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
device_mapper/libdm-deptree.c +1 -1
index f49675c..26251f8 100644
@@ -1487,7 +1487,7 @@ static int _node_message(uint32_t major, uint32_t minor,
 			 int expected_errno, const char *message)
 {
 	struct dm_task *dmt;
-	int r;
+	int r = 0;
 
 	if (!(dmt = dm_task_create(DM_DEVICE_TARGET_MSG)))
 		return_0;