[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [PATCH 5/5] rgmanager: Fix a possible NULL pointer dereference



ACK

On 6/28/2012 9:58 PM, Ryan McCabe wrote:
> Fix a NULL pointer dereference that could happen when cman_get_node_count()
> returns 0 with errno set to EINTR.
> 
> Possibly resolves rhbz#820632
> 
> Signed-off-by: Ryan McCabe <rmccabe redhat com>
> ---
>  rgmanager/src/clulib/members.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/rgmanager/src/clulib/members.c b/rgmanager/src/clulib/members.c
> index f705297..72f4529 100644
> --- a/rgmanager/src/clulib/members.c
> +++ b/rgmanager/src/clulib/members.c
> @@ -367,8 +367,10 @@ get_member_list(cman_handle_t h)
>  
>  	do {	
>  		++tries;
> -		if (nodes)
> +		if (nodes) {
>  			free(nodes);
> +			nodes = NULL;
> +		}
>  
>  		c = cman_get_node_count(h);
>  		if (c <= 0) {
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]