diff options
Diffstat (limited to 'hw/net/rocker/rocker_desc.c')
-rw-r--r-- | hw/net/rocker/rocker_desc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/rocker/rocker_desc.c b/hw/net/rocker/rocker_desc.c index b5c0b4a241..5e697b19e3 100644 --- a/hw/net/rocker/rocker_desc.c +++ b/hw/net/rocker/rocker_desc.c @@ -142,7 +142,7 @@ bool desc_ring_set_size(DescRing *ring, uint32_t size) ring->size = size; ring->head = ring->tail = 0; - ring->info = g_realloc(ring->info, size * sizeof(DescInfo)); + ring->info = g_renew(DescInfo, ring->info, size); if (!ring->info) { return false; } @@ -345,7 +345,7 @@ DescRing *desc_ring_alloc(Rocker *r, int index) { DescRing *ring; - ring = g_malloc0(sizeof(DescRing)); + ring = g_new0(DescRing, 1); if (!ring) { return NULL; } |