diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-03-08 14:55:59 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-03-09 12:05:59 +0100 |
commit | afd1bde36683fd73516f267dd98160c1b54f4ad7 (patch) | |
tree | 8b44898c2abe3e1b634106e44a39e7171fd45999 | |
parent | fada1da80b20b17b7ea2ec4eb6c6ca8259cddc8f (diff) | |
download | NetworkManager-afd1bde36683fd73516f267dd98160c1b54f4ad7.tar.gz |
device: ip-tunnel: free strings on dispose
Fixes: 570fdce93f44a51dbd84bbfe098913141c94b789
-rw-r--r-- | src/devices/nm-device-ip-tunnel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c index 5854437728..4095511211 100644 --- a/src/devices/nm-device-ip-tunnel.c +++ b/src/devices/nm-device-ip-tunnel.c @@ -866,12 +866,27 @@ constructed (GObject *object) } static void +dispose (GObject *object) +{ + NMDeviceIPTunnel *self = NM_DEVICE_IP_TUNNEL (object); + NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE (self); + + g_clear_pointer (&priv->local, g_free); + g_clear_pointer (&priv->remote, g_free); + g_clear_pointer (&priv->input_key, g_free); + g_clear_pointer (&priv->output_key, g_free); + + G_OBJECT_CLASS (nm_device_ip_tunnel_parent_class)->dispose (object); +} + +static void nm_device_ip_tunnel_class_init (NMDeviceIPTunnelClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); object_class->constructed = constructed; + object_class->dispose = dispose; object_class->get_property = get_property; object_class->set_property = set_property; |