/soc/2013/ankitkv/gobjectification: 1d3e542445c3: Unref the hash...

Ankit Vani a at nevitus.org
Fri Jun 14 08:48:32 EDT 2013


Changeset: 1d3e542445c339c6ae219ad63e45fdaaa95adfa8
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-06-14 18:18 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/1d3e542445c3

Description:

Unref the hash function when finalizing PurpleHMACCipher. reset is called by PurpleCipher's finalize.

diffstat:

 libpurple/ciphers/hmac.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (16 lines):

diff --git a/libpurple/ciphers/hmac.c b/libpurple/ciphers/hmac.c
--- a/libpurple/ciphers/hmac.c
+++ b/libpurple/ciphers/hmac.c
@@ -254,9 +254,10 @@ purple_hmac_cipher_get_property(GObject 
 static void
 purple_hmac_cipher_finalize(GObject *obj) {
 	PurpleCipher *cipher = PURPLE_CIPHER(obj);
+	PurpleHMACCipherPrivate *priv = PURPLE_HMAC_CIPHER_GET_PRIVATE(cipher);
 
-	/* reset the cipher so we don't leave any data around... */
-	purple_hmac_cipher_reset(cipher);
+	if (priv->hash != NULL)
+		g_object_unref(priv->hash);
 
 	parent_class->finalize(obj);
 }



More information about the Commits mailing list