Comment 14 for bug 27639

Revision history for this message
Chris Moore (dooglus) wrote :

This crash is caused by the same problem as bug #26106.

You shouldn't use memory after freeing it.

I've tried attaching a patch, but launchpad won't have it (" Oops. Sorry, something just went wrong in Launchpad.") so I'll paste it here and let malone mangle the formatting. Luckily it's quite short:

-----
--- src/Backup/privacy.c.~1~ 2005-04-24 23:47:58.000000000 +0200
+++ src/privacy.c 2006-01-31 13:16:27.000000000 +0100
@@ -85,8 +85,8 @@
  if (l == NULL)
   return FALSE;

- account->permit = g_slist_remove(account->permit, l->data);
  g_free(l->data);
+ account->permit = g_slist_remove(account->permit, l->data);

  if (!local_only && gaim_account_is_connected(account))
   serv_rem_permit(gaim_account_get_connection(account), who);
@@ -156,8 +156,8 @@
  if (l == NULL)
   return FALSE;

- account->deny = g_slist_remove(account->deny, l->data);
  g_free(l->data);
+ account->deny = g_slist_remove(account->deny, l->data);

  if (!local_only && gaim_account_is_connected(account))
   serv_rem_deny(gaim_account_get_connection(account), who);
-----