Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- net/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/hub.c b/net/hub.c index 14b4eec68f..1c403859c6 100644 --- a/net/hub.c +++ b/net/hub.c @@ -79,7 +79,7 @@ static NetHub *net_hub_new(int id) { NetHub *hub; - hub = g_malloc(sizeof(*hub)); + hub = g_new(NetHub, 1); hub->id = id; hub->num_ports = 0; QLIST_INIT(&hub->ports); -- 2.14.2