summaryrefslogtreecommitdiffstats
path: root/hw/rdma/vmw/pvrdma_qp_ops.c
diff options
context:
space:
mode:
authorPeter Maydell2022-03-21 18:46:40 +0100
committerPeter Maydell2022-03-21 18:46:40 +0100
commit330724977b10f5b92610817e8b7d1dfed122df87 (patch)
tree5b4008e89a44bcdccda9a5b21fe15816a019ae91 /hw/rdma/vmw/pvrdma_qp_ops.c
parentMerge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (diff)
parentUse g_new() & friends where that makes obvious sense (diff)
downloadqemu-330724977b10f5b92610817e8b7d1dfed122df87.tar.gz
qemu-330724977b10f5b92610817e8b7d1dfed122df87.tar.xz
qemu-330724977b10f5b92610817e8b7d1dfed122df87.zip
Merge tag 'pull-misc-2022-03-21' of git://repo.or.cz/qemu/armbru into staging
Miscellaneous patches patches for 2022-03-21 # gpg: Signature made Mon 21 Mar 2022 14:48:16 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-misc-2022-03-21' of git://repo.or.cz/qemu/armbru: Use g_new() & friends where that makes obvious sense 9pfs: Use g_new() & friends where that makes obvious sense scripts/coccinelle: New use-g_new-etc.cocci block-qdict: Fix -Werror=maybe-uninitialized build failure Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/rdma/vmw/pvrdma_qp_ops.c')
-rw-r--r--hw/rdma/vmw/pvrdma_qp_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c
index 8050287a6c..bd7cbf2bdf 100644
--- a/hw/rdma/vmw/pvrdma_qp_ops.c
+++ b/hw/rdma/vmw/pvrdma_qp_ops.c
@@ -154,7 +154,7 @@ void pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle)
CompHandlerCtx *comp_ctx;
/* Prepare CQE */
- comp_ctx = g_malloc(sizeof(CompHandlerCtx));
+ comp_ctx = g_new(CompHandlerCtx, 1);
comp_ctx->dev = dev;
comp_ctx->cq_handle = qp->send_cq_handle;
comp_ctx->cqe.wr_id = wqe->hdr.wr_id;
@@ -217,7 +217,7 @@ void pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle)
CompHandlerCtx *comp_ctx;
/* Prepare CQE */
- comp_ctx = g_malloc(sizeof(CompHandlerCtx));
+ comp_ctx = g_new(CompHandlerCtx, 1);
comp_ctx->dev = dev;
comp_ctx->cq_handle = qp->recv_cq_handle;
comp_ctx->cqe.wr_id = wqe->hdr.wr_id;
@@ -259,7 +259,7 @@ void pvrdma_srq_recv(PVRDMADev *dev, uint32_t srq_handle)
CompHandlerCtx *comp_ctx;
/* Prepare CQE */
- comp_ctx = g_malloc(sizeof(CompHandlerCtx));
+ comp_ctx = g_new(CompHandlerCtx, 1);
comp_ctx->dev = dev;
comp_ctx->cq_handle = srq->recv_cq_handle;
comp_ctx->cqe.wr_id = wqe->hdr.wr_id;