# HG changeset patch # User Peter Hosey # Date 1305397193 25200 # Node ID a1f37df70d04d6a48f888a68c87408db74132edd # Parent 02c5148373be36a2e98e6083bf484fc4a18bdf7e Modified version of a patch from ahihi on the discuss list, releasing the string we get containing the raw image data. The Python internal library does not follow Core Foundation naming rules. PyObject_GetAttrString returns an ownership, which we must release. diff -r 02c5148373be -r a1f37df70d04 Bindings/python/libgrowl.c --- a/Bindings/python/libgrowl.c Sat May 14 10:26:21 2011 -0700 +++ b/Bindings/python/libgrowl.c Sat May 14 11:19:53 2011 -0700 @@ -115,9 +115,11 @@ CFDataRef convertedValue = CFDataCreate(kCFAllocatorDefault, (const UInt8 *)PyString_AsString(lValue), PyString_Size(lValue)); + Py_DECREF(lValue); CFDictionarySetValue(note, convertedKey, convertedValue); CFRelease(convertedValue); } else { + Py_DECREF(lValue); CFRelease(convertedKey); PyErr_SetString(PyExc_TypeError, "Icon with rawImageData attribute present must ensure it is a string."); goto error;