Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
22454:ab2c3a93267e | 22455:dc599fcdac8d |
---|---|
111 | 111 |
112 g_return_val_if_fail(buddy != NULL, NULL); | 112 g_return_val_if_fail(buddy != NULL, NULL); |
113 | 113 |
114 stats = g_hash_table_lookup(_buddy_stats, buddy->name); | 114 stats = g_hash_table_lookup(_buddy_stats, buddy->name); |
115 if(!stats) { | 115 if(!stats) { |
116 stats = g_malloc(sizeof(CapStatistics)); | 116 stats = g_malloc0(sizeof(CapStatistics)); |
117 stats->last_message = -1; | 117 stats->last_message = -1; |
118 stats->last_message_status_id = NULL; | |
119 stats->last_status_id = NULL; | |
120 stats->prediction = NULL; | |
121 stats->buddy = buddy; | 118 stats->buddy = buddy; |
122 stats->last_seen = -1; | 119 stats->last_seen = -1; |
123 stats->last_status_id = ""; | 120 stats->last_status_id = ""; |
124 | 121 |
125 g_hash_table_insert(_buddy_stats, g_strdup(buddy->name), stats); | 122 g_hash_table_insert(_buddy_stats, g_strdup(buddy->name), stats); |