comparison src/protocols/oscar/ssi.c @ 4234:64d834b6caf2

[gaim-migrate @ 4480] Fix a crash which happened under the following circumstances (and maybe other, similar circumstances): 1) Add an ICQ buddy that requires authorization to an AIM screen names buddy list 2) Do not request authorization 3) Delete the buddy from your buddy list It crashes because of some code that attempts to free the same memory twice. It's all good. Oh, also: 741 packets transmitted, 462 packets received, +11 duplicates, 37% packet loss That's Time Warner cable for you. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 07 Jan 2003 23:24:20 +0000
parents 9f729d6d88a6
children cba92ec56248
comparison
equal deleted inserted replaced
4233:d3069a71f14d 4234:64d834b6caf2
1281 item->name = (char *)malloc((strlen(name)+1)*sizeof(char)); 1281 item->name = (char *)malloc((strlen(name)+1)*sizeof(char));
1282 strcpy(item->name, name); 1282 strcpy(item->name, name);
1283 } else 1283 } else
1284 item->name = NULL; 1284 item->name = NULL;
1285 aim_freetlvchain(&item->data); 1285 aim_freetlvchain(&item->data);
1286 item->data = data; 1286 item->data = aim_tlvlist_copy(data);
1287 } 1287 }
1288 1288
1289 if ((item = aim_ssi_itemlist_find(sess->ssi.official, gid, bid))) { 1289 if ((item = aim_ssi_itemlist_find(sess->ssi.official, gid, bid))) {
1290 item->type = type; 1290 item->type = type;
1291 free(item->name); 1291 free(item->name);
1293 item->name = (char *)malloc((strlen(name)+1)*sizeof(char)); 1293 item->name = (char *)malloc((strlen(name)+1)*sizeof(char));
1294 strcpy(item->name, name); 1294 strcpy(item->name, name);
1295 } else 1295 } else
1296 item->name = NULL; 1296 item->name = NULL;
1297 aim_freetlvchain(&item->data); 1297 aim_freetlvchain(&item->data);
1298 item->data = data; 1298 item->data = aim_tlvlist_copy(data);
1299 } 1299 }
1300 1300
1301 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) 1301 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
1302 ret = userfunc(sess, rx); 1302 ret = userfunc(sess, rx);
1303 1303
1304 aim_freetlvchain(&data);
1304 free(name); 1305 free(name);
1305 } 1306 }
1306 1307
1307 return ret; 1308 return ret;
1308 } 1309 }