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:
Chen Gang 2014-12-17 04:58:42 +08:00 committed by Stefan Hajnoczi
parent d46858377b
commit a39d97c7be
1 changed files with 1 additions and 0 deletions

View File

@ -428,6 +428,7 @@ static int net_free(struct XenDevice *xendev)
netdev->nic = NULL;
}
g_free(netdev->mac);
netdev->mac = NULL;
return 0;
}