[Openais] [lck 2/4] Test lockId to NULL

Jan Friesse jfriesse at redhat.com
Thu Jun 4 09:12:14 PDT 2009


---
 trunk/lib/lck.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/trunk/lib/lck.c b/trunk/lib/lck.c
index 5d2dbce..6a43447 100644
--- a/trunk/lib/lck.c
+++ b/trunk/lib/lck.c
@@ -773,6 +773,11 @@ saLckResourceLock (
 		goto error_exit;
 	}
 
+	if (lockId == NULL) {
+		error = SA_AIS_ERR_INVALID_PARAM;
+		goto error_exit;
+	}
+
 	error = hdb_error_to_sa (hdb_handle_get (&lckResourceHandleDatabase,
 		lckResourceHandle, (void *)&lckResourceInstance));
 	if (error != SA_AIS_OK) {
@@ -899,6 +904,11 @@ saLckResourceLockAsync (
 		goto error_exit;
 	}
 
+	if (lockId == NULL) {
+		error = SA_AIS_ERR_INVALID_PARAM;
+		goto error_exit;
+	}
+
 	error = hdb_error_to_sa (hdb_handle_get (&lckResourceHandleDatabase,
 		lckResourceHandle, (void *)&lckResourceInstance));
 	if (error != SA_AIS_OK) {
-- 
1.5.5.6



More information about the Openais mailing list