qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 82/88] hw/ipmi: use g_new() family of functions


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [PATCH 82/88] hw/ipmi: use g_new() family of functions
Date: Fri, 6 Oct 2017 20:50:17 -0300

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
Shouldn't this file be under the PowerPC section of MAINTAINERS?

 hw/ipmi/ipmi_bmc_sim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
index 277c28cb40..a68792a2cb 100644
--- a/hw/ipmi/ipmi_bmc_sim.c
+++ b/hw/ipmi/ipmi_bmc_sim.c
@@ -1073,7 +1073,7 @@ static void send_msg(IPMIBmcSim *ibs,
         return;
     }
 
-    msg = g_malloc(sizeof(*msg));
+    msg = g_new(IPMIRcvBufEntry, 1);
     msg->buf[0] = ((netfn | 1) << 2) | rqLun; /* NetFN, and make a response */
     msg->buf[1] = ipmb_checksum(msg->buf, 1, 0);
     msg->buf[2] = cmd[0]; /* rsSA */
-- 
2.14.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]