Ticket #1240: sugar-1240.patch

File sugar-1240.patch, 879 bytes (added by alsroot, 12 years ago)
  • src/carquinyol/metadatareader.c

    From 542c4973e766faaf24ad759dbb13612cb3a179f7 Mon Sep 17 00:00:00 2001
    From: Aleksey Lim <alsroot@member.fsf.org>
    Date: Wed, 26 Aug 2009 11:45:01 +0000
    Subject: Memory leaks after many get_properties() ds calls #1240
    
    ---
     src/carquinyol/metadatareader.c |    2 ++
     1 files changed, 2 insertions(+), 0 deletions(-)
    
    diff --git a/src/carquinyol/metadatareader.c b/src/carquinyol/metadatareader.c
    index 73bfe4a..a357ca6 100644
    a b add_property(const char *metadata_path, char *property_name, PyObject *dict, 
    8989        value_buf = NULL;
    9090
    9191        value = PyObject_CallObject(byte_array_type, args);
     92        Py_DECREF(args);
     93
    9294        if (value == NULL) {
    9395            PyErr_SetString(PyExc_ValueError,
    9496                            "Failed to convert value to dbus.ByteArray");