Author: tridge
Date: 2006-05-22 06:17:10 +0000 (Mon, 22 May 2006)
New Revision: 15796

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15796

Log:

this talloc_reference() was causing a memory leak on every NTVFS
request. The problem is that the talloc_free() in
smbsrv_send_reply_nosign() frees this reference, but doesn't free the
memory iself, thus leaving it attached to the connection context.

Metze, what was the idea behind this reference? If we need it, then we
need a corresponding talloc_free() to go with it.

Modified:
   branches/SAMBA_4_0/source/smb_server/smb_server.h


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb_server.h
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb_server.h   2006-05-22 03:55:01 UTC 
(rev 15795)
+++ branches/SAMBA_4_0/source/smb_server/smb_server.h   2006-05-22 06:17:10 UTC 
(rev 15796)
@@ -421,10 +421,6 @@
                smbsrv_send_error(req, NT_STATUS_NO_MEMORY); \
                return; \
        } \
-       if (!talloc_reference(req->ntvfs, req)) { \
-               smbsrv_send_error(req, NT_STATUS_NO_MEMORY); \
-               return; \
-       } \
        req->ntvfs->frontend_data.private_data = req; \
 } while (0)
 

Reply via email to