changeset 25:c56db1b46b0d

[gaim-migrate @ 34] A crap load more of memleak fixes. There's still several more. I've mailed Peter Techian about these. Hopefully he'll pick up on them. Thanks again for the Patch, Pete. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 24 Mar 2000 08:55:32 +0000
parents 7d0ef30fe8c0
children b9e90a914e20
files ChangeLog NEWS doc/CREDITS src/aim.c src/conversation.c src/dialogs.c src/server.c src/util.c
diffstat 8 files changed, 49 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 24 06:59:03 2000 +0000
+++ b/ChangeLog	Fri Mar 24 08:55:32 2000 +0000
@@ -12,6 +12,9 @@
 	  and numbers.
 	* Various GNOME Applet Enhancements (thanks AGAIN to 
 	  Eric.  Someone needs to stop this boy :-) ) 
+	* A lot of random, obscure bugs fixed
+	* About 6 memory leaks fixed (yes, we're embarassed)
+	  (Thanks to Jeramey and Peter Teichman for these!)
 	
 version 0.9.11:
 	* <STRIKE>Strike Tag Support</STRIKE> :-)
--- a/NEWS	Fri Mar 24 06:59:03 2000 +0000
+++ b/NEWS	Fri Mar 24 08:55:32 2000 +0000
@@ -1,6 +1,16 @@
 -=[ GAIM ]=-  The Pimpin' Penguin AIM Clone That's Good For The Soul!
 
 0.9.12:
+	Well guys, looks like we got some nifty things in this version.
+TrueType Fonts are supported for those XFSTT buffs out there (or whatever
+else you use).  A crap load of those plaguing memory leaks have FINALLY been
+fixed.  My brother, Jeramey, and a new friend Peter Teichan helped stomp
+those babies out.  A rad guy by the name of Eric Warmenhoven has been
+really sweet lately and has all but rewritten the Gnome Applet support :).
+He submitted patch after patch.  I finally got annoyed with him (just kidding bud)
+and gave him CVS access.  Look for Gnome Applet support in Gaim to start improving.
+That's about all for now.  I wanted to get this release out there.  File Receive
+support will be in 0.9.13 which is due out soon.
 	
 0.9.11:
 	Jeramey got a new Comfy Chair! Its very very comfy!  Whee!
--- a/doc/CREDITS	Fri Mar 24 06:59:03 2000 +0000
+++ b/doc/CREDITS	Fri Mar 24 08:55:32 2000 +0000
@@ -12,6 +12,13 @@
 
 ** LOGO DESIGNED BY: Naru Sundar **
 
+Eric Warmenhoven
+	This guy's rad.  He patched up the messy Gnome Applet stuff.
+
+Peter Teichan & Jeramey Crawford
+	Found a crap load of those ever-plaguing memory leaks.  Maybe Gaim
+	is finally unleaky :)
+
 David Prater    <IM: dRaven43>          draven@tcsx.net   
 	Log and Colour Button Images
 Sébastien Carpe <IM: Seb Carpe>
--- a/src/aim.c	Fri Mar 24 06:59:03 2000 +0000
+++ b/src/aim.c	Fri Mar 24 08:55:32 2000 +0000
@@ -161,9 +161,11 @@
         char *txt = gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(combo)->entry), 0, -1);
         struct aim_user *u;
         
-        if (!(general_options & OPT_GEN_REMEMBER_PASS))
+        if (!(general_options & OPT_GEN_REMEMBER_PASS)) {
+		g_free(txt);
                 return;
-        
+        }
+
         u = find_user(txt);
 
         if (u != NULL) {
@@ -171,7 +173,8 @@
         } else {
                 gtk_entry_set_text(GTK_ENTRY(pass), "");
         }
-        
+       
+	g_free(txt); 
         return;
 }
 
--- a/src/conversation.c	Fri Mar 24 06:59:03 2000 +0000
+++ b/src/conversation.c	Fri Mar 24 08:55:32 2000 +0000
@@ -327,9 +327,12 @@
         char buf[BUF_LONG];
 	char *buf2;
         char *buf3;
+	gchar *buf4;
         int hdrlen;
 
-        g_snprintf(buf, BUF_LONG, "%s", gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1)); 
+	buf4 = gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1);
+	g_snprintf(buf, BUF_LONG, "%s", buf4);
+	g_free(buf4);
 
         if (!strlen(buf)) {
                 return;
@@ -446,6 +449,7 @@
 		}
 	} while (p1 || p2);
 	tmpo[GTK_EDITABLE(entry)->current_pos]=h;
+	g_free(tmpo);
 	return res;
 }
 
--- a/src/dialogs.c	Fri Mar 24 06:59:03 2000 +0000
+++ b/src/dialogs.c	Fri Mar 24 08:55:32 2000 +0000
@@ -385,6 +385,7 @@
         aol_icon(w->window->window);
 
         gtk_widget_show(w->window);
+	g_free(buf);
 }
 
 
@@ -890,7 +891,7 @@
 	junk = gtk_editable_get_chars(GTK_EDITABLE(b->text), 0, -1);
 
 	g_snprintf(current_user->user_info, sizeof(current_user->user_info), "%s", junk);
-	
+		
 	save_prefs();
 
         buf = g_malloc(strlen(current_user->user_info) * 2);
@@ -898,7 +899,7 @@
         escape_text(buf);
         serv_set_info(buf);
         g_free(buf);
-
+	g_free(junk);
 	destroy_dialog(NULL, b->window);
 	g_free(b);
 }
@@ -1438,6 +1439,8 @@
 		gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_log), bname);
 	}
 
+	g_free(buf);
+
 	gtk_widget_show(logdialog);
 	gdk_window_raise(logdialog->window);
 }
@@ -1883,6 +1886,7 @@
         if (!strcasecmp(first, "Config {\n")) {
                 destroy_dialog(NULL, importdialog);
                 importdialog = NULL;
+		g_free(buf);
                 return;
         } else if (buf[0] == 'm') {
                 buf2 = buf;
--- a/src/server.c	Fri Mar 24 06:59:03 2000 +0000
+++ b/src/server.c	Fri Mar 24 08:55:32 2000 +0000
@@ -543,10 +543,13 @@
         if (!strcasecmp(nname, normalize(current_user->username))) {
                 correction_time = (int)(signon - login_time);
                 update_all_buddies();
-                if (!b)
+                if (!b) {
+			g_free(nname);
                         return;
+		}
         }
 
+	g_free(nname);
         
         if (!b) {
                 sprintf(debug_buff,"Error, no such person\n");
@@ -576,10 +579,12 @@
                                 gtk_window_set_title(GTK_WINDOW(cv->window), who);
                                 /* no free 'who', set_title needs it.
                                  */
+				g_free(who); //FIXME
                                 break;
                         }
                         cnv = cnv->next;
                 }
+		g_free(who); //FIXME
                 g_snprintf(b->name, sizeof(b->name), "%s", name);
                 /*gtk_label_set_text(GTK_LABEL(b->label), b->name);*/
 
--- a/src/util.c	Fri Mar 24 06:59:03 2000 +0000
+++ b/src/util.c	Fri Mar 24 08:55:32 2000 +0000
@@ -304,6 +304,9 @@
 
         if (!(general_options & OPT_GEN_LOG_ALL)) {
 
+		g_free(buf);
+		g_free(buf2);
+
                 l = find_log_info(c->name);
                 if (!l)
                         return NULL;
@@ -379,6 +382,9 @@
 		fprintf(fd, "IM Sessions with %s", c->name );
 		fprintf(fd, "</TITLE></HEAD><BODY BGCOLOR=\"ffffff\">\n" );
         }
+
+	g_free(buf);
+	g_free(buf2);
         return fd;
 }