[gjs] context: Fix program name leak



commit 8ef2bf960bd7c625d7c2ef0107274009be8441b4
Author: Sam Spilsbury <smspillaz gmail com>
Date:   Wed Jan 8 13:51:19 2014 -0200

    context: Fix program name leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721246

 gjs/context.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 781e0be..803e2f8 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -402,6 +402,11 @@ gjs_context_finalize(GObject *object)
         js_context->search_path = NULL;
     }
 
+    if (js_context->program_name != NULL) {
+        g_free(js_context->program_name);
+        js_context->program_name = NULL;
+    }
+
     if (gjs_context_get_current() == (GjsContext*)object)
         gjs_context_make_current(NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]