Re: [PATCH 3/3] Port hooks and iptables code to new command execution APIs

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

 



On 05/25/2010 07:24 AM, Daniel P. Berrange wrote:
> This proof of concept shows how two existing uses of virExec
> and virRun can be ported to the new virCommand APIs, and how
> much simpler the code becomes

Love it!

> -    va_start(args, arg);
> -
>      while ((s = va_arg(args, const char *)))
> -        if (!(argv[n++] = strdup(s)))
> -            goto error;
> -
> +        virCommandAddArg(cmd, s);
>      va_end(args);

Hmm - at first, I wondered why coverity did not detect the missing
va_end() call on the oom case pre-patch.  But on further investigation,
it looks like your patch is based off an older commit, since the missing
va_end() was already fixed in commit d564fcb3, so you'll have a slight
conflict to resolve when you rebase.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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