Commit 7105b056583186a8e18d0da46e4e8db46592f0ab
Committed by
Blue Swirl
1 parent
168ccc11
xen nic: use qemu_malloc
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Showing
1 changed file
with
2 additions
and
2 deletions
hw/xen_nic.c
... | ... | @@ -176,7 +176,7 @@ static void net_tx_packets(struct XenNetDev *netdev) |
176 | 176 | if (txreq.flags & NETTXF_csum_blank) { |
177 | 177 | /* have read-only mapping -> can't fill checksum in-place */ |
178 | 178 | if (!tmpbuf) |
179 | - tmpbuf = malloc(PAGE_SIZE); | |
179 | + tmpbuf = qemu_malloc(PAGE_SIZE); | |
180 | 180 | memcpy(tmpbuf, page + txreq.offset, txreq.size); |
181 | 181 | net_checksum_calculate(tmpbuf, txreq.size); |
182 | 182 | qemu_send_packet(netdev->vs, tmpbuf, txreq.size); |
... | ... | @@ -190,7 +190,7 @@ static void net_tx_packets(struct XenNetDev *netdev) |
190 | 190 | break; |
191 | 191 | netdev->tx_work = 0; |
192 | 192 | } |
193 | - free(tmpbuf); | |
193 | + qemu_free(tmpbuf); | |
194 | 194 | } |
195 | 195 | |
196 | 196 | /* ------------------------------------------------------------- */ | ... | ... |