Re: [PATCH] init path to NULL

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

 



At 04/06/2011 02:42 PM, Matthias Bolte Write:
> 2011/4/6 Wen Congyang <wency@xxxxxxxxxxxxxx>:
>> This bug was introduce by commit 57162db8, and it will cause libvirtd crashed.
>>
>> ---
>>  src/util/pci.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/util/pci.c b/src/util/pci.c
>> index 6ed96f4..a7b8caa 100644
>> --- a/src/util/pci.c
>> +++ b/src/util/pci.c
>> @@ -1180,7 +1180,7 @@ pciWaitForDeviceCleanup(pciDevice *dev, const char *matcher)
>>  static char *
>>  pciReadDeviceID(pciDevice *dev, const char *id_name)
>>  {
>> -    char *path;
>> +    char *path = NULL;
>>     char *id_str;
>>
>>     if (pciDeviceFile(&path, dev->name, id_name) < 0) {
>> --
>> 1.7.1
>>
> 
> Oops... shows that I didn't tests this well enough :(
> 
> ACK.
> 
> Maybe you could make the commit summary more verbose, for example
> "pci: avoid invalid free, init path to NULL".

Thanks, pushed with commit summary changed.

> 
> Matthias
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]