From: Ian Jackson Subject: Re: [PATCH] tools/libxl: Fix free() of wild pointer in libxl__initiate_device_remove() Date: Mon, 23 Jun 2014 18:11:45 +0100 Message-ID: <21416.24529.19720.729286@mariner.uk.xensource.com> References: <1403114655-4314-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403114655-4314-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Wei Liu , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("[PATCH] tools/libxl: Fix free() of wild pointer in libxl__initiate_device_remove()"): > libxl__initiate_device_remove() had a preexisting error path issue where > libxl_dominfo_dispose() could be called on a libxl_dominfo object before it > had been initialised with libxl_dominfo_init(). > > This was safe until c/s ab44401 added the pointer ssid_label, which point > libxl_dominfo_dispose() free()s. > > Unconditionally initialise info in libxl__initiate_device_remove() before > taking an error path which will free it. > > Coverity-ID: 1223212 > Signed-off-by: Andrew Cooper > CC: Wei Liu > CC: Ian Campbell Acked-by: Ian Jackson Committed-by: Ian Jackson