Mercurial > pidgin
comparison libpurple/protocols/oscar/msgcookie.c @ 17191:1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 22 May 2007 18:56:09 +0000 |
parents | 32c366eeeb99 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
17190:12d0ad970a15 | 17191:1927f4ead3ca |
---|---|
111 IcbmCookie *cookie; | 111 IcbmCookie *cookie; |
112 | 112 |
113 if (!c) | 113 if (!c) |
114 return NULL; | 114 return NULL; |
115 | 115 |
116 cookie = calloc(1, sizeof(IcbmCookie)); | 116 cookie = g_new0(IcbmCookie, 1); |
117 | 117 |
118 cookie->data = data; | 118 cookie->data = data; |
119 cookie->type = type; | 119 cookie->type = type; |
120 memcpy(cookie->cookie, c, 8); | 120 memcpy(cookie->cookie, c, 8); |
121 | 121 |
170 *prev = cur->next; | 170 *prev = cur->next; |
171 else | 171 else |
172 prev = &cur->next; | 172 prev = &cur->next; |
173 } | 173 } |
174 | 174 |
175 free(cookie->data); | 175 g_free(cookie->data); |
176 free(cookie); | 176 g_free(cookie); |
177 | 177 |
178 return 0; | 178 return 0; |
179 } | 179 } |
180 | 180 |
181 /* XXX I hate switch */ | 181 /* XXX I hate switch */ |