Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   rgmanager: Fix a possible NULL pointer dereference (http://www.linux-archive.org/cluster-development/680039-rgmanager-fix-possible-null-pointer-dereference.html)

"Fabio M. Di Nitto" 07-04-2012 11:07 AM

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) {
>


All times are GMT. The time now is 01:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.