[libvirt] [PATCH v3 1/2] Optimize machine option to set more options with it

Eric Blake eblake at redhat.com
Wed Apr 3 17:22:10 UTC 2013


On 04/03/2013 10:14 AM, John Ferlan wrote:
>>>       } else {
>>> +        virBuffer buf = VIR_BUFFER_INITIALIZER;
>>>
>>>           virCommandAddArg(cmd, "-machine");
>>> -        virBufferAsprintf(&buf, "%s", def->os.machine);
>>> +        virBufferAdd(&buf, def->os.machine, -1);
>>>
>>>           if (def->mem.dump_core) {
>>>               if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
>>> -                virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>>> -                               "%s", _("dump-guest-core is not
>>> available "
>>> -                                " with this QEMU binary"));
>>> +                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>>> +                               _("dump-guest-core is not available "
>>> +                                 "with this QEMU binary"));
>>>                   return -1;

> Just ran a make -C tests valgrind and got the following which points
> right at this patch:

Sheesh - this return -1 is indeed a memory leak.  I'll fix it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130403/af1104a4/attachment-0001.sig>


More information about the libvir-list mailing list