Bug 83283 - memory leak
memory leak
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: bonobo-activation (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brian Stein
: Triaged
Depends On:
Blocks: 79579 CambridgeTarget
  Show dependency treegraph
 
Reported: 2003-02-01 09:21 EST by Brian Stein
Modified: 2013-03-01 00:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-06 11:22:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Arjan van de Ven 2003-02-01 09:21:19 EST
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 10:00:01 EST
http://bugzilla.gnome.org/show_bug.cgi?id=104987
Comment 2 Kjartan Maraas 2003-02-17 17:48:51 EST
Fixed upstream and released in 2.2.0.
Comment 3 Alexander Larsson 2003-08-06 11:22:56 EDT
closing this bug then

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