diff libpurple/protocols/oscar/util.c @ 17235: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 48d2c9dbfcc2
line wrap: on
line diff
--- a/libpurple/protocols/oscar/util.c	Tue May 22 13:00:00 2007 +0000
+++ b/libpurple/protocols/oscar/util.c	Tue May 22 18:56:09 2007 +0000
@@ -101,14 +101,14 @@
 	next = strchr(last, dl);
 
 	if (curCount < theindex) {
-		toReturn = malloc(sizeof(char));
+		toReturn = g_malloc(sizeof(char));
 		*toReturn = '\0';
 	} else {
 		if (next == NULL) {
-			toReturn = malloc((strlen(last) + 1) * sizeof(char));
+			toReturn = g_malloc((strlen(last) + 1) * sizeof(char));
 			strcpy(toReturn, last);
 		} else {
-			toReturn = malloc((next - last + 1) * sizeof(char));
+			toReturn = g_malloc((next - last + 1) * sizeof(char));
 			memcpy(toReturn, last, (next - last));
 			toReturn[next - last] = '\0';
 		}