summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-06-13 16:53:13 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-07-05 11:09:03 +0200
commit46f81e18f70eb62c92ac6d62c720bda59cf01dad (patch)
treee7aa83e248ccb27214144b1a0dbabe1ce2ecd9a6
parent40babe1c448bd2bb53d4d9beff8b8ab387bbe00e (diff)
downloadNetworkManager-46f81e18f70eb62c92ac6d62c720bda59cf01dad.tar.gz
n-dhcp4: client/connection: fix memory leak
Free the request when the connection gets destroyed. Signed-off-by: Beniamino Galvani <bgalvani@redhat.com> https://github.com/nettools/n-dhcp4/pull/1
-rw-r--r--shared/n-dhcp4/src/n-dhcp4-c-connection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shared/n-dhcp4/src/n-dhcp4-c-connection.c b/shared/n-dhcp4/src/n-dhcp4-c-connection.c
index d9b8a2d63d..5c50dacfd8 100644
--- a/shared/n-dhcp4/src/n-dhcp4-c-connection.c
+++ b/shared/n-dhcp4/src/n-dhcp4-c-connection.c
@@ -84,6 +84,7 @@ int n_dhcp4_c_connection_init(NDhcp4CConnection *connection,
*/
void n_dhcp4_c_connection_deinit(NDhcp4CConnection *connection) {
n_dhcp4_c_connection_close(connection);
+ n_dhcp4_outgoing_free(connection->request);
*connection = (NDhcp4CConnection)N_DHCP4_C_CONNECTION_NULL(*connection);
}