Re: [PATCH 6/9] qemu: command: use VIR_AUTOFREE in qemuBuildFSDevCommandLine

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

 



On Tue, Jul 16, 2019 at 13:06:54 +0200, Ján Tomko wrote:
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  src/qemu/qemu_command.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 02a6642207..8617b010dc 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -2807,7 +2807,7 @@ qemuBuildFSDevCommandLine(virCommandPtr cmd,
>                            const virDomainDef *def,
>                            virQEMUCapsPtr qemuCaps)
>  {
> -    char *optstr;
> +    VIR_AUTOFREE(char *) optstr = NULL;

'optstr' is used twice in this function. If you want to convert to
VIR_AUTOFREE, introduce two variables for the two distinct uses.

Attachment: signature.asc
Description: PGP 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]

  Powered by Linux