From 49847f02e83433b12f12f47543b75135ab529682 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Tue, 13 Jan 2015 19:25:37 +0100 Subject: [PATCH] mconn-crypt: explicitly release RSA key in dispose --- src/mconn-crypt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mconn-crypt.c b/src/mconn-crypt.c index b075b09..a0ee720 100644 --- a/src/mconn-crypt.c +++ b/src/mconn-crypt.c @@ -69,7 +69,11 @@ mconn_crypt_dispose (GObject *object) { MConnCrypt *self = (MConnCrypt *)object; - g_clear_pointer(&self->priv->key, RSA_free); + if (self->priv->key != NULL) + { + RSA_free(self->priv->key); + self->priv->key = NULL; + } G_OBJECT_CLASS (mconn_crypt_parent_class)->dispose (object); }