Mercurial > pidgin.yaz
comparison libpurple/protocols/sametime/sametime.c @ 16391:24bbd7e46bfe
Change the imgstore and by extension, then the buddy icon code to take over
the references to icon data instead of calling g_memdup(). This eliminates
g_memdup()ing and g_free()ing in ~50% of the callers. For the rest, it's no
worse (they now do a g_memdup() instead of the core) and they may be able to
be modified in the future to avoid that.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 25 Apr 2007 22:23:29 +0000 |
parents | 391a79778f89 |
children | 5e47b3427b28 |
comparison
equal
deleted
inserted
replaced
16390:4fc51a87ce42 | 16391:24bbd7e46bfe |
---|---|
2697 cid = (char *) purple_mime_part_get_field(part, "Content-ID"); | 2697 cid = (char *) purple_mime_part_get_field(part, "Content-ID"); |
2698 cid = make_cid(cid); | 2698 cid = make_cid(cid); |
2699 | 2699 |
2700 /* add image to the purple image store */ | 2700 /* add image to the purple image store */ |
2701 img = purple_imgstore_add_with_id(d_dat, d_len, cid); | 2701 img = purple_imgstore_add_with_id(d_dat, d_len, cid); |
2702 g_free(d_dat); | |
2703 | 2702 |
2704 /* map the cid to the image store identifier */ | 2703 /* map the cid to the image store identifier */ |
2705 g_hash_table_insert(img_by_cid, cid, GINT_TO_POINTER(img)); | 2704 g_hash_table_insert(img_by_cid, cid, GINT_TO_POINTER(img)); |
2706 | 2705 |
2707 /* recall the image for dereferencing later */ | 2706 /* recall the image for dereferencing later */ |