hw/net/xen_nic.c: Set 'netdev->mac' to NULL after free it
Since net_init() checks whether 'netdev->mac' is NULL, before alloc it; net_release() also need set 'netdev->mac' to NULL after free it. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
d46858377b
commit
a39d97c7be
|
@ -428,6 +428,7 @@ static int net_free(struct XenDevice *xendev)
|
||||||
netdev->nic = NULL;
|
netdev->nic = NULL;
|
||||||
}
|
}
|
||||||
g_free(netdev->mac);
|
g_free(netdev->mac);
|
||||||
|
netdev->mac = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue