summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-05 22:17:51 +0000
committerJeremy Allison <jra@samba.org>1998-08-05 22:17:51 +0000
commita4b872451e5195063d657bff8763227e9f82b4b9 (patch)
tree6057ae5000f5bb502dddb44894075c588dd51a48
parent3aeadef40b92d031036a50042bbf8fbe60d0954a (diff)
downloadsamba-a4b872451e5195063d657bff8763227e9f82b4b9.tar.gz
samba-a4b872451e5195063d657bff8763227e9f82b4b9.tar.bz2
samba-a4b872451e5195063d657bff8763227e9f82b4b9.zip
Fixed memory leak when freeing ChangeNotify structures.
Jeremy. (This used to be commit 996c5ac97a8d1443bc8abc59b9a10ff3aeb77389)
-rw-r--r--source3/smbd/nttrans.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 1f724a4bfb..b4873efea0 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -999,7 +999,7 @@ void remove_pending_change_notify_requests_by_fid(int fnum)
while(cnbp != NULL) {
if(cnbp->fnum == fnum) {
- ubi_slRemNext( &change_notify_queue, prev);
+ free((char *)ubi_slRemNext( &change_notify_queue, prev));
cnbp = (change_notify_buf *)(prev ? ubi_slNext(prev) : ubi_slFirst(&change_notify_queue));
continue;
}
@@ -1021,7 +1021,7 @@ void remove_pending_change_notify_requests_by_mid(int mid)
while(cnbp != NULL) {
if(SVAL(cnbp->request_buf,smb_mid) == mid) {
change_notify_reply_packet(cnbp->request_buf,ERRSRV,ERRaccess);
- ubi_slRemNext( &change_notify_queue, prev);
+ free((char *)ubi_slRemNext( &change_notify_queue, prev));
cnbp = (change_notify_buf *)(prev ? ubi_slNext(prev) : ubi_slFirst(&change_notify_queue));
continue;
}
@@ -1066,7 +1066,7 @@ void process_pending_change_notify_queue(time_t t)
* Remove the entry and return an error to the client.
*/
change_notify_reply_packet(cnbp->request_buf,ERRSRV,ERRaccess);
- ubi_slRemNext( &change_notify_queue, prev);
+ free((char *)ubi_slRemNext( &change_notify_queue, prev));
cnbp = (change_notify_buf *)(prev ? ubi_slNext(prev) : ubi_slFirst(&change_notify_queue));
continue;
}
@@ -1078,7 +1078,7 @@ Error was %s.\n", cnum, strerror(errno) ));
* Remove the entry and return an error to the client.
*/
change_notify_reply_packet(cnbp->request_buf,ERRSRV,ERRaccess);
- ubi_slRemNext( &change_notify_queue, prev);
+ free((char *)ubi_slRemNext( &change_notify_queue, prev));
cnbp = (change_notify_buf *)(prev ? ubi_slNext(prev) : ubi_slFirst(&change_notify_queue));
unbecome_user();
continue;
@@ -1091,7 +1091,7 @@ Error was %s.\n", fsp->name, strerror(errno) ));
* Remove the entry and return an error to the client.
*/
change_notify_reply_packet(cnbp->request_buf,ERRSRV,ERRaccess);
- ubi_slRemNext( &change_notify_queue, prev);
+ free((char *)ubi_slRemNext( &change_notify_queue, prev));
cnbp = (change_notify_buf *)(prev ? ubi_slNext(prev) : ubi_slFirst(&change_notify_queue));
unbecome_user();
continue;
@@ -1105,7 +1105,7 @@ Error was %s.\n", fsp->name, strerror(errno) ));
DEBUG(5,("process_pending_change_notify_queue: directory fnum = %d, name = %s changed\n",
fnum, fsp->name ));
change_notify_reply_packet(cnbp->request_buf,ERRDOS,ERROR_NOTIFY_ENUM_DIR);
- ubi_slRemNext( &change_notify_queue, prev);
+ free((char *)ubi_slRemNext( &change_notify_queue, prev));
cnbp = (change_notify_buf *)(prev ? ubi_slNext(prev) : ubi_slFirst(&change_notify_queue));
unbecome_user();
continue;