diff pidgin/plugins/cap/cap.c @ 22455:dc599fcdac8d

Fix for accessing uninitialized memory
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 13 Mar 2008 01:23:00 +0000
parents c38d72677c8a
children caa64d8580f4
line wrap: on
line diff
--- a/pidgin/plugins/cap/cap.c	Wed Mar 12 01:44:06 2008 +0000
+++ b/pidgin/plugins/cap/cap.c	Thu Mar 13 01:23:00 2008 +0000
@@ -113,11 +113,8 @@
 
 	stats = g_hash_table_lookup(_buddy_stats, buddy->name);
 	if(!stats) {
-		stats = g_malloc(sizeof(CapStatistics));
+		stats = g_malloc0(sizeof(CapStatistics));
 		stats->last_message = -1;
-		stats->last_message_status_id = NULL;
-		stats->last_status_id = NULL;
-		stats->prediction = NULL;
 		stats->buddy = buddy;
 		stats->last_seen = -1;
 		stats->last_status_id = "";