[PATCH 07/14] Silent a warning from coverity about icmap_track being used without assign

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Steven Dake <sdake@xxxxxxxxxx>
---
 exec/wd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/exec/wd.c b/exec/wd.c
index e9a14ff..8e4ed14 100644
--- a/exec/wd.c
+++ b/exec/wd.c
@@ -388,7 +388,7 @@ static int32_t wd_resource_create (char *res_path, char *res_name)
 {
 	char *state;
 	uint64_t tmp_value;
-	struct resource *ref = malloc (sizeof (struct resource));
+	struct resource *ref = calloc (1, sizeof (struct resource));
 	char key_name[ICMAP_KEYNAME_MAXLEN];
 
 	strcpy(ref->res_path, res_path);
-- 
1.7.7.5

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux