OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] cryo: fix segfault in save_msgq_data() during checkpoint
[PATCH] cryo: fix segfault in save_msgq_data() during checkpoint [message #30915] Tue, 10 June 2008 12:26
Benjamin Thery is currently offline  Benjamin Thery
Messages: 79
Registered: March 2007
Member
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@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@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: Re: [RFC PATCH 0/5] memcg: VM overcommit accounting and handling
Next Topic: [-mm] CPU controller statistics (v5)
Goto Forum:
  


Current Time: Mon Jul 15 14:18:35 GMT 2024

Total time taken to generate the page: 0.02538 seconds