[gjs/gnome-3-38] Fix leak when virtual function is unimplemented.



commit be97d7dd99ff0241d39267380b124a6bbe5c5286
Author: Evan Welsh <noreply evanwelsh com>
Date:   Tue Sep 8 14:29:30 2020 -0500

    Fix leak when virtual function is unimplemented.

 gi/function.cpp | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gi/function.cpp b/gi/function.cpp
index 5814de851..9e99a3bd5 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1229,6 +1229,7 @@ init_cached_function_data (JSContext      *context,
 
             gjs_throw(context, "Virtual function not implemented: %s",
                       error->message);
+            g_clear_error(&error);
             return false;
         }
 


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