changeset 22466:dc599fcdac8d

Fix for accessing uninitialized memory
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 13 Mar 2008 01:23:00 +0000
parents ab2c3a93267e
children 713310b97512 0daeabc1a185
files pidgin/plugins/cap/cap.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
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 = "";