mirror of
https://github.com/arsenetar/send2trash.git
synced 2026-01-28 09:31:38 +00:00
v1.0.1: Fixed memory leak.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user