@resp is allocated by virNetlinkCommand and the caller is responsible
for freeing the buffer. Since we already converted this module to use
VIR_AUTO{FREE,PTR} macros, let's resolve the problem by using them.
Signed-off-by: Shi Lei <shi_lei@massclouds.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
virSocketAddrPtr gateway,
unsigned int metric)
{
- struct nlmsghdr *resp = NULL;
unsigned int recvbuflen;
unsigned int ifindex;
struct rtmsg rtmsg;
VIR_AUTOPTR(virNetlinkMsg) nlmsg = NULL;
VIR_AUTOFREE(char *) toStr = NULL;
VIR_AUTOFREE(char *) viaStr = NULL;
+ VIR_AUTOFREE(struct nlmsghdr *) resp = NULL;
actualAddr = addr;