[CRIU] [PATCH] ipc: Initialize @message
Cyrill Gorcunov
gorcunov at openvz.org
Thu Sep 20 02:47:41 EDT 2012
Otherwise we can jump to err label and try to
xfree(message) which has value from stack.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
ipc_ns.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ipc_ns.c b/ipc_ns.c
index 0d0b039..9e259fe 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -189,7 +189,7 @@ static void pr_info_ipc_msg_entry(const IpcMsgEntry *msg)
static int dump_ipc_msg_queue_messages(int fd, const IpcMsgEntry *entry,
unsigned int msg_nr)
{
- struct msgbuf *message;
+ struct msgbuf *message = NULL;
unsigned int msgmax;
int ret, msg_cnt = 0;
struct sysctl_req req[] = {
--
1.7.7.6
More information about the CRIU
mailing list