# HG changeset patch # User Mark Doliner # Date 1068107537 0 # Node ID 0e7a835e24335bec6cf0741e77774124f02285bb # Parent 064c697cc22338d9f60f089d1d90d664333044c5 [gaim-migrate @ 8058] I fixed some memleaks. Trying to view someone's log twice causes bad things? committer: Tailor Script diff -r 064c697cc223 -r 0e7a835e2433 src/gtkconv.c --- a/src/gtkconv.c Thu Nov 06 08:15:11 2003 +0000 +++ b/src/gtkconv.c Thu Nov 06 08:32:17 2003 +0000 @@ -4716,6 +4716,7 @@ g_free(t2); */ g_free(with_font_tag); + g_free(new_message); } diff -r 064c697cc223 -r 0e7a835e2433 src/log.c --- a/src/log.c Thu Nov 06 08:15:11 2003 +0000 +++ b/src/log.c Thu Nov 06 08:32:17 2003 +0000 @@ -209,9 +209,10 @@ (gaim_find_prpl(gaim_account_get_protocol(account)))->list_icon(account, NULL); char *path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL); + g_free(me); + if (!(dir = g_dir_open(path, 0, NULL))) { g_free(path); - g_free(me); return NULL; } while ((filename = g_dir_read_name(dir))) { @@ -253,6 +254,7 @@ } } g_dir_close(dir); + g_free(path); return list; } @@ -302,6 +304,7 @@ dir = g_build_filename(ud, "logs", prpl, guy, gaim_normalize(log->account, log->name), NULL); mkdir (dir, S_IRUSR | S_IWUSR | S_IXUSR); + g_free(guy); char *filename = g_build_filename(dir, date, NULL); g_free(dir); @@ -405,6 +408,7 @@ dir = g_build_filename(ud, "logs", prpl, guy, gaim_normalize(log->account, log->name), NULL); mkdir (dir, S_IRUSR | S_IWUSR | S_IXUSR); + g_free(guy); char *filename = g_build_filename(dir, date, NULL); g_free(dir); @@ -420,6 +424,7 @@ gaim_debug(GAIM_DEBUG_ERROR, "log", "Could not create log file %s\n", filename); return; } + g_free(filename); strftime(date, sizeof(date), "%F %T", localtime(&log->time)); fprintf(log->logger_data, "Conversation with %s at %s on %s (%s)\n", log->name, date, gaim_account_get_username(log->account), prpl); @@ -495,11 +500,15 @@ char *path = g_build_filename(gaim_user_dir(), "logs", logfile, NULL); char *newlog; + g_free(logfile); + GaimLog *log = NULL; GList *list = NULL; - if (!(file = fopen(path, "r"))) + if (!(file = fopen(path, "r"))) { + g_free(path); return NULL; + } while (fgets(buf, BUF_LONG, file)) { if ((newlog = strstr(buf, "---- New C"))) { diff -r 064c697cc223 -r 0e7a835e2433 src/protocols/oscar/locate.c --- a/src/protocols/oscar/locate.c Thu Nov 06 08:15:11 2003 +0000 +++ b/src/protocols/oscar/locate.c Thu Nov 06 08:32:17 2003 +0000 @@ -249,9 +249,9 @@ aim_locate_getinfoshort(sess, cur->sn, 0x00000003); } -/* +/** * Remove this screen name from our queue. If this info was resquested - * by our info request queue, then pop off the next element of the queue. + * by our info request queue, then pop the next element off of the queue. * * @param sess The aim session. * @param sn Screen name of the info we just received.