Commits
7b706f33ac and
4acb7887e4 introduced some compound type *Free
wrappers in order to use them with VIR_DEFINE_AUTOPTR_FUNC. However,
since those were not used in the code right away, Clang complained about
unused functions (static ones that are defined by the macro above).
This patch puts the defined functions in use.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
char *buf = NULL;
char *next = NULL;
int ret = -1, len;
- virNetDevMcastEntryPtr entry = NULL;
+ VIR_AUTOPTR(virNetDevMcastEntry) entry = NULL;
mcast->entries = NULL;
mcast->nentries = 0;
ret = 0;
cleanup:
VIR_FREE(buf);
- VIR_FREE(entry);
return ret;
}
.nl_groups = 0,
};
struct pollfd fds[1];
- virNetlinkHandle *nlhandle = NULL;
+ VIR_AUTOPTR(virNetlinkHandle) nlhandle = NULL;
int len = 0;
memset(fds, 0, sizeof(fds));
*respbuflen = 0;
}
- virNetlinkFree(nlhandle);
return ret;
}
.nl_pid = dst_pid,
.nl_groups = 0,
};
- virNetlinkHandle *nlhandle = NULL;
+ VIR_AUTOPTR(virNetlinkHandle) nlhandle = NULL;
if (!(nlhandle = virNetlinkSendRequest(nl_msg, src_pid, nladdr,
protocol, groups)))
cleanup:
VIR_FREE(resp);
- virNetlinkFree(nlhandle);
return ret;
}