From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
gdbstub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdbstub.c b/gdbstub.c
index 2a94030d3b..5f0d8af1c0 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1786,7 +1786,7 @@ static void gdb_accept(void)
/* set short latency */
socket_set_nodelay(fd);
- s = g_malloc0(sizeof(GDBState));
+ s = g_new0(GDBState, 1);
s->c_cpu = first_cpu;
s->g_cpu = first_cpu;
s->fd = fd;
@@ -1980,7 +1980,7 @@ int gdbserver_start(const char *device)
s = gdbserver_state;
if (!s) {
- s = g_malloc0(sizeof(GDBState));
+ s = g_new0(GDBState, 1);
gdbserver_state = s;
qemu_add_vm_change_state_handler(gdb_vm_state_change, NULL);
--
2.14.2