From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerone Young Subject: [PATCH] tiddyup tools/xenstore/talloc.c Date: Thu, 11 Aug 2005 16:15:26 -0500 Message-ID: <1123794926.3043.56.camel@thinkpad> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org Add check so that p is not operated on if context is not also null. Signed-off-by: Jerone Young --- tools/xenstore/talloc.c.old 2005-08-11 11:48:59.000000000 -0500 +++ tools/xenstore/talloc.c 2005-08-11 12:30:14.000000000 -0500 @@ -292,7 +292,7 @@ static int talloc_unreference(const void for (h=tc->refs;h;h=h->next) { struct talloc_chunk *p = talloc_parent_chunk(h); - if ((p==NULL && context==NULL) || p+1 == context) break; + if (p==NULL || context==NULL || p+1 == context) break; } if (h == NULL) { return -1; -- Jerone Young IBM Linux Technology Center jyoung5@us.ibm.com 512-838-1157 (T/L: 678-1157)