Browse Source

Fix segfault when address of checkpoint handle is null to the initialize function

(Logical change 1.213)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@682 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 20 years ago
parent
commit
c08428f246
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lib/ckpt.c

+ 4 - 0
lib/ckpt.c

@@ -168,6 +168,10 @@ saCkptInitialize (
 	struct ckptInstance *ckptInstance;
 	SaAisErrorT error = SA_AIS_OK;
 
+	if (ckptHandle == NULL) {
+		return (SA_AIS_ERR_INVALID_PARAM);
+	}
+
 	error = saVersionVerify (&ckptVersionDatabase, version);
 	if (error != SA_AIS_OK) {
 		goto error_no_destroy;