[pygobject] Fix leak in _PyGI_ERROR_PREFIX()



commit e4098cbc28ff9324fa851bca2e423da4e51b5091
Author: Martin Pitt <martinpitt gnome org>
Date:   Fri Mar 1 15:12:31 2013 +0100

    Fix leak in _PyGI_ERROR_PREFIX()
    
    Properly clean up our allocated py_error_prefix string.
    
    Fixes memory leak in e. g. test_gi.TestArray.test_array_fixed_int_in.

 gi/pygi-private.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-private.h b/gi/pygi-private.h
index 1f59fdf..97eced5 100644
--- a/gi/pygi-private.h
+++ b/gi/pygi-private.h
@@ -51,6 +51,7 @@ G_BEGIN_DECLS
             } \
         } \
         PyErr_Restore(py_error_type, py_error_value, py_error_traceback); \
+        Py_DECREF(py_error_prefix); \
     } \
 } G_STMT_END
 


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