WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel][PATCH][ioemu] strip tap subtype prefix from image name (

To: Christoph Egger <Christoph.Egger@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel][PATCH][ioemu] strip tap subtype prefix from image name (restyled)
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 30 Jan 2008 14:45:03 +0000
Cc: Pat Campbell <plc@xxxxxxxxxx>
Delivery-date: Wed, 30 Jan 2008 06:46:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200801301538.24875.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchjTrJM8PYCU89BEdyG4gAX8io7RQ==
Thread-topic: [Xen-devel][PATCH][ioemu] strip tap subtype prefix from image name (restyled)
User-agent: Microsoft-Entourage/11.3.6.070618


On 30/1/08 14:38, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:

>>   out:
>> +    free(drv);
>> +    free(buf);
>> +    free(bpath);
>>      free(image);
>>      free(vec);
> 
> That doesn't work. If strdup() fails, then drv and buf are NULL here.
> Analagous counts for the other failures.
> You need to check for != NULL before calling free().

free() is defined to accept a NULL argument.

 -- Keir



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