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
This commit is contained in:
@@ -84,6 +84,7 @@ int n_dhcp4_c_connection_init(NDhcp4CConnection *connection,
|
|||||||
*/
|
*/
|
||||||
void n_dhcp4_c_connection_deinit(NDhcp4CConnection *connection) {
|
void n_dhcp4_c_connection_deinit(NDhcp4CConnection *connection) {
|
||||||
n_dhcp4_c_connection_close(connection);
|
n_dhcp4_c_connection_close(connection);
|
||||||
|
n_dhcp4_outgoing_free(connection->request);
|
||||||
*connection = (NDhcp4CConnection)N_DHCP4_C_CONNECTION_NULL(*connection);
|
*connection = (NDhcp4CConnection)N_DHCP4_C_CONNECTION_NULL(*connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user