svn commit: samba r13868 - in branches/SAMBA_4_0/source/smb_server/smb: .

metze at samba.org metze at samba.org
Mon Mar 6 15:38:08 GMT 2006


Author: metze
Date: 2006-03-06 15:38:07 +0000 (Mon, 06 Mar 2006)
New Revision: 13868

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

Log:
remove useless talloc_free() wrapper

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/receive.c
   branches/SAMBA_4_0/source/smb_server/smb/reply.c
   branches/SAMBA_4_0/source/smb_server/smb/request.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/receive.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb/receive.c	2006-03-06 15:34:29 UTC (rev 13867)
+++ branches/SAMBA_4_0/source/smb_server/smb/receive.c	2006-03-06 15:38:07 UTC (rev 13868)
@@ -515,7 +515,7 @@
 		    (req->smb_conn->signing.signing_state != SMB_SIGNING_ENGINE_OFF)) {
 			DEBUG(1,("SKIP ERROR REPLY: %s %s because of unknown smb signing case\n",
 				smb_fn_name(type), nt_errstr(status)));
-			req_destroy(req);
+			talloc_free(req);
 			return;
 		}
 		req_reply_error(req, status);
@@ -543,7 +543,7 @@
 		    (req->smb_conn->signing.signing_state != SMB_SIGNING_ENGINE_OFF)) {
 			DEBUG(1,("SKIP ERROR REPLY: %s %s because of unknown smb signing case\n",
 				smb_fn_name(type), nt_errstr(status)));
-			req_destroy(req);
+			talloc_free(req);
 			return;
 		}
 		req_reply_error(req, status);

Modified: branches/SAMBA_4_0/source/smb_server/smb/reply.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb/reply.c	2006-03-06 15:34:29 UTC (rev 13867)
+++ branches/SAMBA_4_0/source/smb_server/smb/reply.c	2006-03-06 15:38:07 UTC (rev 13868)
@@ -1759,7 +1759,7 @@
 	/* if it was an oplock break ack then we only send a reply if
 	   there was an error */
 	if (lck->lockx.in.ulock_cnt + lck->lockx.in.lock_cnt == 0) {
-		req_destroy(req);
+		talloc_free(req);
 		return;
 	}
 
@@ -2336,7 +2336,7 @@
 {
 	/* NOTE: this request does not generate a reply */
 	ntvfs_cancel(req);
-	req_destroy(req);
+	talloc_free(req);
 }
 
 /****************************************************************************
@@ -2452,10 +2452,10 @@
 		
 	case SMBkeepalive: 
 		/* session keepalive - swallow it */
-		req_destroy(req);
+		talloc_free(req);
 		return;
 	}
 
 	DEBUG(0,("Unexpected NBT session packet (%d)\n", msg_type));
-	req_destroy(req);
+	talloc_free(req);
 }

Modified: branches/SAMBA_4_0/source/smb_server/smb/request.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb/request.c	2006-03-06 15:34:29 UTC (rev 13867)
+++ branches/SAMBA_4_0/source/smb_server/smb/request.c	2006-03-06 15:38:07 UTC (rev 13868)
@@ -32,14 +32,6 @@
 /* we over allocate the data buffer to prevent too many realloc calls */
 #define REQ_OVER_ALLOCATION 0
 
-/* destroy a request structure */
-void req_destroy(struct smbsrv_request *req)
-{
-	/* ahh, its so nice to destroy a complex structure in such a
-	 * simple way! */
-	talloc_free(req);
-}
-
 /****************************************************************************
 construct a basic request packet, mostly used to construct async packets
 such as change notify and oplock break requests
@@ -304,7 +296,7 @@
 	if (!NT_STATUS_IS_OK(status)) {
 		smbsrv_terminate_connection(req->smb_conn, nt_errstr(status));
 	}
-	req_destroy(req);
+	talloc_free(req);
 }
 
 /*



More information about the samba-cvs mailing list