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(a)gmail.com>
---
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