[Telepathy-commits] [telepathy-gabble/master] sha1_bin: Fix a leak, and fix size on amd64

Alban Crequy alban.crequy at collabora.co.uk
Fri Oct 17 12:37:45 PDT 2008


---
 src/util.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/util.c b/src/util.c
index 4119fca..35fab78 100644
--- a/src/util.c
+++ b/src/util.c
@@ -65,8 +65,9 @@ sha1_bin (const gchar *bytes,
 
   g_assert (g_checksum_type_get_length (G_CHECKSUM_SHA1) == SHA1_HASH_SIZE);
   g_checksum_update (checksum, (const guchar *) bytes, len);
-  g_checksum_get_digest (checksum, out, &len);
+  g_checksum_get_digest (checksum, out, &out_len);
   g_assert (out_len == SHA1_HASH_SIZE);
+  g_checksum_free (checksum);
 }
 
 static void
-- 
1.5.6.5



More information about the Telepathy-commits mailing list