Re: [PATCH 2/2] qemumonitorjsontest: Introduce DO_TEST_SIMPLE

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

 



On 09/20/2013 12:32 PM, John Ferlan wrote:
> On 09/18/2013 12:16 PM, Michal Privoznik wrote:
>>  static int
>> +testQemuMonitorJSONSimpleFunc(const void *opaque)
>> +{
>> +    const testQemuMonitorJSONSimpleFuncDataPtr data = (const testQemuMonitorJSONSimpleFuncDataPtr) opaque;
>> +    virDomainXMLOptionPtr xmlopt = data->xmlopt;
>> +    qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
> 
> Same here:
> 
> (1) Event returned_null: 	Function "qemuMonitorTestNew(bool, virDomainXMLOptionPtr, virDomainObjPtr, virQEMUDriverPtr)" returns null (checked 14 out of 16 times). [details]
> (11) Event var_assigned: 	Assigning: "test" = null return value from "qemuMonitorTestNew(bool, virDomainXMLOptionPtr, virDomainObjPtr, virQEMUDriverPtr)".
> 
>> +    const char *reply = data->reply;
>> +    int ret = -1;
>> +
>> +    if (!reply)
>> +        reply = "{\"return\":{}}";
>> +
>> +    if (qemuMonitorTestAddItem(test, data->cmd, reply) < 0)
> 
> (13) Event dereference: 	Dereferencing a pointer that might be null "test" when calling "qemuMonitorTestAddItem(qemuMonitorTestPtr, char const *, char const *)". [details]
> 

Both should be fixed by:
5b36ab9 Don't dereference NULL in qemumonitorjsontest

Jan

--
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]