changeset 4580:3fef2d45dce0

[gaim-migrate @ 4861] (12:13:17) ari: This fixes a double-free, resulting in a crash when MALLOC_CHECK_=2, and fixes a problem where when the browser is set to Manual and you click on a link, the same link then becomes corrupted (12:14:14) ari: basically the last one was because whoever changed browser.c assumed strdelimit returned a new string committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 12 Feb 2003 17:16:16 +0000
parents 0ea6a4c53f38
children 4b1e24835bbf
files src/browser.c src/module.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser.c	Wed Feb 12 04:53:21 2003 +0000
+++ b/src/browser.c	Wed Feb 12 17:16:16 2003 +0000
@@ -568,7 +568,8 @@
 				return;
 			}
 
-			space_free_url = g_strdelimit(url, " ", '+');
+			space_free_url = g_strdup(url);
+			g_strdelimit(space_free_url, " ", '+');
 			command = g_strdup_printf("%s %s", web_command, space_free_url);
  			g_free(space_free_url);
  			} break;
--- a/src/module.c	Wed Feb 12 04:53:21 2003 +0000
+++ b/src/module.c	Wed Feb 12 17:16:16 2003 +0000
@@ -664,7 +664,8 @@
 			if (g_module_symbol(p->handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove))
 				gaim_plugin_remove();
 		}
-		g_free(p);
+		if(p)
+			g_free(p);
 		c = c->next;
 	}
 }