Commits

Peter Hosey committed a1f37df

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. <http://docs.python.org/release/2.6/c-api/object.html>;

Comments (0)

Files changed (1)

Bindings/python/libgrowl.c

 				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;