projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d468583
)
hw/net/xen_nic.c: Set 'netdev->mac' to NULL after free it
author
Chen Gang
<gang.chen.5i5j@gmail.com>
Tue, 16 Dec 2014 20:58:42 +0000
(
04:58
+0800)
committer
Stefan Hajnoczi
<stefanha@redhat.com>
Mon, 12 Jan 2015 10:16:23 +0000
(10:16 +0000)
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>
hw/net/xen_nic.c
patch
|
blob
|
history
diff --git
a/hw/net/xen_nic.c
b/hw/net/xen_nic.c
index 8eaa77b62d30f0a730ed34c32122f75bdc15ceef..19ecfc4ccf9b862d21c02d017761ab35a6ff3d58 100644
(file)
--- a/
hw/net/xen_nic.c
+++ b/
hw/net/xen_nic.c
@@
-428,6
+428,7
@@
static int net_free(struct XenDevice *xendev)
netdev->nic = NULL;
}
g_free(netdev->mac);
+ netdev->mac = NULL;
return 0;
}