From de898fdcaa343bec5560ea991b0c2e971e899e22 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 19 Apr 2010 11:24:06 +0200 Subject: [PATCH] v1.0.1: Fixed memory leak. --- CHANGES | 5 +++++ modules/send2trash_osx.c | 1 + setup.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 32b5118..e5fb2fa 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Version 1.0.1 -- 2010/04/19 +--- + +* Fixed memory leak in OS X module. + Version 1.0.0 -- 2010/04/07 --- diff --git a/modules/send2trash_osx.c b/modules/send2trash_osx.c index f0df40c..eaec9a4 100644 --- a/modules/send2trash_osx.c +++ b/modules/send2trash_osx.c @@ -21,6 +21,7 @@ static PyObject* send2trash_osx_send(PyObject *self, PyObject *args) FSPathMakeRefWithOptions(utf8_chars, kFSPathMakeRefDoNotFollowLeafSymlink, &fp, NULL); op_result = FSMoveObjectToTrashSync(&fp, NULL, kFSFileOperationDefaultOptions); + PyMem_Free(utf8_chars); if (op_result != noErr) { PyErr_SetString(PyExc_OSError, GetMacOSStatusCommentString(op_result)); return NULL; diff --git a/setup.py b/setup.py index 3bceb95..7fea9d0 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ if sys.platform == 'win32': setup( name='Send2Trash', - version='1.0.0', + version='1.0.1', author='Hardcoded Software', author_email='hsoft@hardcoded.net', packages=['send2trash'],