diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtest/virtio-9p-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index 01ca076..e28c71b 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c @@ -468,12 +468,12 @@ static void v9fs_rreaddir(P9Req *req, uint32_t *count, uint32_t *nentries, togo -= 13 + 8 + 1 + 2 + slen, ++n) { if (!e) { - e = g_malloc(sizeof(struct V9fsDirent)); + e = g_new(struct V9fsDirent, 1); if (entries) { *entries = e; } } else { - e = e->next = g_malloc(sizeof(struct V9fsDirent)); + e = e->next = g_new(struct V9fsDirent, 1); } e->next = NULL; /* qid[13] offset[8] type[1] name[s] */ |