diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-10-26 10:07:02 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-10-26 17:26:20 +1100 |
commit | 728e56b4636b668aaac60ec557d6fe16b530a6f9 (patch) | |
tree | 8be7d4297b30fb91e666cdee57586aff048953c8 /source3 | |
parent | e107c6ace73ac40894fdd66860cfeae9115d5cd9 (diff) | |
download | samba-728e56b4636b668aaac60ec557d6fe16b530a6f9.tar.gz samba-728e56b4636b668aaac60ec557d6fe16b530a6f9.tar.bz2 samba-728e56b4636b668aaac60ec557d6fe16b530a6f9.zip |
pysmbd: Remember to close files after setting the NT ACL
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/pysmbd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index cfc4012630..9de26291d2 100644 --- a/source3/smbd/pysmbd.c +++ b/source3/smbd/pysmbd.c @@ -101,6 +101,9 @@ static NTSTATUS set_nt_acl_no_snum(const char *fname, set_conn_connectpath(conn, "/"); smbd_vfs_init(conn); + if (!posix_locking_init(false)) { + return NT_STATUS_NO_MEMORY; + } fsp = talloc_zero(frame, struct files_struct); if (fsp == NULL) { @@ -145,6 +148,8 @@ static NTSTATUS set_nt_acl_no_snum(const char *fname, DEBUG(0,("set_nt_acl_no_snum: fset_nt_acl returned %s.\n", nt_errstr(status))); } + SMB_VFS_CLOSE(fsp); + conn_free(conn); TALLOC_FREE(frame); |