Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 83283

Summary: memory leak
Product: [Retired] Red Hat Linux Reporter: Brian Stein <bstein>
Component: bonobo-activationAssignee: Brian Stein <bstein>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: bstevens, sopwith
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-06 15:22:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 79579, 100644    

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