[Devel] [PATCH] cryo: fix segfault in save_msgq_data() during checkpoint

Benjamin Thery benjamin.thery at bull.net
Tue Jun 10 05:26:50 PDT 2008


Fix missing initialization in save_msgq_data() that triggers a segfault
in realloc() when cr is compiled with -g.

Signed-off-by: Benjamin Thery <benjamin.thery at bull.net>
---
 container_ckpt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: cryodev/container_ckpt.c
===================================================================
--- cryodev.orig/container_ckpt.c
+++ cryodev/container_ckpt.c
@@ -249,7 +249,7 @@ static void save_msgq_data(int fd, msgqi
 	 */
 	for (i = 0; i < minfo->nr_entries; i++) {
 		int m;
-		struct msq_msg *msg_array;
+		struct msq_msg *msg_array = NULL;
 		struct msgbuf *msg = NULL;
 
 		/*

-- 
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list