diff options
author | Simo Sorce <idra@samba.org> | 2001-09-15 13:21:54 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-09-15 13:21:54 +0000 |
commit | 72c35310b2b0d39c077c50a2175c76ced5d4c662 (patch) | |
tree | a3cba0379c82df419a10e98c06f6517bc7097369 /source3/smbd | |
parent | 7892c494e7321c64b20bf7e1d794a6b6508fe84a (diff) | |
download | samba-72c35310b2b0d39c077c50a2175c76ced5d4c662.tar.gz samba-72c35310b2b0d39c077c50a2175c76ced5d4c662.tar.bz2 samba-72c35310b2b0d39c077c50a2175c76ced5d4c662.zip |
use variables _before_ freeing them!
thanks to Andreas Moroder for spotting these two.
(This used to be commit 01f30ca0ad472eaab8f80ec4278b1d391be3a1ae)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 145d12e3f3..7974ea0ae0 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -497,9 +497,9 @@ dev = %x, inode = %.0f\n", *p_oplock_request, share_entry->op_type, fname, (unsi lock_share_entry(conn, dev, inode); if(opb_ret == False) { - free((char *)old_shares); DEBUG(0,("open_mode_check: FAILED when breaking oplock (%x) on file %s, \ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (double)inode)); + free((char *)old_shares); errno = EACCES; unix_ERR_class = ERRDOS; unix_ERR_code = ERRbadshare; @@ -1234,11 +1234,10 @@ dev = %x, inode = %.0f\n", share_entry->op_type, fname, (unsigned int)dev, (doub unlock_share_entry(conn, dev, inode); if(request_oplock_break(share_entry, dev, inode) == False) { - free((char *)old_shares); - DEBUG(0,("check_file_sharing: FAILED when breaking oplock (%x) on file %s, \ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (double)inode)); + free((char *)old_shares); return False; } lock_share_entry(conn, dev, inode); |