]> Git Repo - qemu.git/commitdiff
qemu-sockets: use qapi_free_SocketAddress in cleanup
authorMarc-André Lureau <[email protected]>
Wed, 6 Jul 2016 16:42:46 +0000 (18:42 +0200)
committerPaolo Bonzini <[email protected]>
Tue, 12 Jul 2016 16:31:27 +0000 (18:31 +0200)
Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that
may leak some linked data.

Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <20160706164246[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
util/qemu-sockets.c

index fb83d489449cff2ebe290e9dc7c3e34a9f206988..777af49d53cd759e2445539fcf6dd27a342baf16 100644 (file)
@@ -1012,7 +1012,7 @@ void socket_listen_cleanup(int fd, Error **errp)
         }
     }
 
-    g_free(addr);
+    qapi_free_SocketAddress(addr);
 }
 
 int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)
This page took 0.027701 seconds and 4 git commands to generate.