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

Ryan O'Hara rohara at redhat.com
Thu Jun 4 09:27:12 PDT 2009


ACK.

On Thu, Jun 04, 2009 at 06:12:14PM +0200, Jan Friesse wrote:
> ---
>  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
> 
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais


More information about the Openais mailing list