[Devel] [PATCH 2/2] sem restore: don't free sma if it's an error

serue at us.ibm.com serue at us.ibm.com
Tue Jan 12 20:09:21 PST 2010


From: Serge Hallyn <serue at us.ibm.com>

Signed-off-by: Serge Hallyn <serue at us.ibm.com>
---
 ipc/checkpoint_sem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ipc/checkpoint_sem.c b/ipc/checkpoint_sem.c
index 53a19ed..395c84d 100644
--- a/ipc/checkpoint_sem.c
+++ b/ipc/checkpoint_sem.c
@@ -186,6 +186,7 @@ int restore_ipc_sem(struct ckpt_ctx *ctx, struct ipc_namespace *ns)
 	sma = restore_sem_array(ctx, h->sem_nsems);
 	if (IS_ERR(sma)) {
 		ret = PTR_ERR(sma);
+		sma = NULL;
 		goto out;
 	}
 
-- 
1.6.0.6

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




More information about the Devel mailing list