Re: [PATCH v1 17/18] use VIR_AUTOFREE in src/util/virfirewall.c

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

 



On Sun, Jun 03, 2018 at 01:42:15PM +0530, Sukrit Bhatnagar wrote:
> Modify code to use VIR_AUTOFREE macro wherever required.
>
> Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@xxxxxxxxx>
> ---
>  src/util/virfirewall.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)

...

> @@ -808,12 +805,11 @@ virFirewallApplyRule(virFirewallPtr firewall,
>                       virFirewallRulePtr rule,
>                       bool ignoreErrors)
>  {
> -    char *output = NULL;
> +    VIR_AUTOFREE(char *) output = NULL;
>      char **lines = NULL;
>      int ret = -1;
> -    char *str = virFirewallRuleToString(rule);
> +    VIR_AUTOFREE(char *) str = virFirewallRuleToString(rule);

let's couple ^this VIR_AUTOFREE with the one above...

Erik

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