Bug 83283 - memory leak
Summary: memory leak
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bonobo-activation
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brian Stein
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 79579 CambridgeTarget
TreeView+ depends on / blocked
 
Reported: 2003-02-01 14:21 UTC by Brian Stein
Modified: 2013-03-01 05:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-06 15:22:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Arjan van de Ven 2003-02-01 14:21:19 UTC
bonobo_activation_registration_env_set:
        env_value->name  = g_strdup (name);
        env_value->value = value ? g_strdup (value) : NULL;
                                                                               
                    
        reg_env = g_slist_prepend (reg_env, env_value);
                                                                               
                    
bonobo_activation_registration_env_free:
        for (l = reg_env; l; l = l->next)
                g_free (l->data);
                                                                               
                    

note the absense of freeing ->name and ->value
--- bonobo-activation-register.c~       2003-02-01 15:15:34.000000000 +0100
+++ bonobo-activation-register.c        2003-02-01 15:15:34.000000000 +0100
@@ -458,9 +458,14 @@
 bonobo_activation_registration_env_free (GSList *reg_env)
 {
        GSList *l;
-
-       for (l = reg_env; l; l = l->next)
+       RegistrationEnvValue *env_value;
+
+       for (l = reg_env; l; l = l->next) {
+               env_value = (RegistrationEnvValue*)l->data;
+               g_free(env_value->name);
+               g_free(env_value->value);
                g_free (l->data);
+       }
  
        g_slist_free (reg_env);
 }

proposed solution:

Comment 1 Havoc Pennington 2003-02-01 15:00:01 UTC
http://bugzilla.gnome.org/show_bug.cgi?id=104987

Comment 2 Kjartan Maraas 2003-02-17 22:48:51 UTC
Fixed upstream and released in 2.2.0.

Comment 3 Alexander Larsson 2003-08-06 15:22:56 UTC
closing this bug then


Note You need to log in before you can comment on or make changes to this bug.