mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3:pysmbd: fix fd leak in py_smbd_create_file()
Various 'samba-tool domain backup' commands use this and will fail if there's over ~1000 files in the sysvol folder. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13898 Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
ab943babc3
commit
d8fa464a2d
@ -1185,9 +1185,12 @@ static PyObject *py_smbd_create_file(PyObject *self, PyObject *args, PyObject *k
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DBG_ERR("init_files_struct failed: %s\n",
|
||||
nt_errstr(status));
|
||||
} else if (fsp != NULL) {
|
||||
SMB_VFS_CLOSE(fsp);
|
||||
}
|
||||
|
||||
TALLOC_FREE(frame);
|
||||
PyErr_NTSTATUS_NOT_OK_RAISE(status);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user