If the IPC operation fails in saCkptCheckpointOpen, return a proper
error instead of returning a random value obtained from an uninitialized
res_lib_ckpt_checkpointopen.header.error.
Index: lib/ckpt.c
===================================================================
--- lib/ckpt.c	(revision 2036)
+++ lib/ckpt.c	(working copy)
@@ -574,6 +574,9 @@
 		&res_lib_ckpt_checkpointopen,
 		sizeof (struct res_lib_ckpt_checkpointopen));
 
+	if (error != SA_AIS_OK) {
+		goto error_put_destroy;
+	}
 	if (res_lib_ckpt_checkpointopen.header.error != SA_AIS_OK) {
 		error = res_lib_ckpt_checkpointopen.header.error;
 		goto error_put_destroy;
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to