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

[Xen-devel] Re: Xenstored: eliminate double free and fixes for memory leak


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Peter Teoh" <htmldeveloper@xxxxxxxxx>
  • Date: Mon, 17 Sep 2007 13:48:08 +0800
  • Delivery-date: Sun, 16 Sep 2007 22:48:50 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=GurpdTBpQqTkV23T1Bs8M2ubBp2UYmoYDvQ48WoO06ZUTkngUXUJPhUa55VNBjvlQtLhDxOEpkuj/kGn+zwwz03Ufgu8R1Tj3ci22VYlWk5L1UC9eK+4lr7t+OcqCIa44Jft972OtgO2pCDJK6ISe8/zvSoNGCVdC9fJyPD7Ywg=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

The changes are too interdependent, and therefore, I am now
resubmitting it as a complete patch, instead of splitting it up into
multiple patches.   All goes to the same file - xenstored_core.c.

On top of the comments given above, here are the additional comments:

Two FIXME comments added - for which a problem has been identified,
but fixing it will incurred a lot of changes in design etc.

First problem is the returned value from get_parent() - it can be
either a static value, or a dynamically allocated value (from
talloc_asprintf()), and therefore it is very difficult to judge
whether to free the memory or not.

Second (minor) problem is during destroy_node(), the allocated memory
within the node structure is not free.   These are allocated in
construct_node() function.

Please comments, thanks.

Attachment: eliminate_double_free_and_mem_leak.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.