svn commit: samba r23402 - in branches: SAMBA_3_0/source/rpc_server SAMBA_3_0_25/source/rpc_server SAMBA_3_0_26/source/rpc_server

jra at samba.org jra at samba.org
Sat Jun 9 00:27:30 GMT 2007


Author: jra
Date: 2007-06-09 00:27:28 +0000 (Sat, 09 Jun 2007)
New Revision: 23402

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

Log:
Got bitten by a talloc hierarchy. Make sure we alloc
off the pipe ctx now ->names is part of the containing
struct.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c
   branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_nt.c
   branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c	2007-06-09 00:18:07 UTC (rev 23401)
+++ branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c	2007-06-09 00:27:28 UTC (rev 23402)
@@ -420,7 +420,7 @@
 	if (names->num_entries) {
 		int i;
 
-		oldnames->name = TALLOC_ARRAY(oldnames, LSA_TRANS_NAME, names->num_entries);
+		oldnames->name = TALLOC_ARRAY(mem_ctx, LSA_TRANS_NAME, names->num_entries);
 
 		if (!oldnames->name) {
 			return NT_STATUS_NO_MEMORY;
@@ -838,8 +838,8 @@
 		return status;
 	}
 
-	names->name = TALLOC_ARRAY(names, LSA_TRANS_NAME2, num_sids);
-	names->uni_name = TALLOC_ARRAY(names, UNISTR2, num_sids);
+	names->name = TALLOC_ARRAY(p->mem_ctx, LSA_TRANS_NAME2, num_sids);
+	names->uni_name = TALLOC_ARRAY(p->mem_ctx, UNISTR2, num_sids);
 	if ((names->name == NULL) || (names->uni_name == NULL)) {
 		return NT_STATUS_NO_MEMORY;
 	}

Modified: branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_nt.c
===================================================================
--- branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_nt.c	2007-06-09 00:18:07 UTC (rev 23401)
+++ branches/SAMBA_3_0_25/source/rpc_server/srv_lsa_nt.c	2007-06-09 00:27:28 UTC (rev 23402)
@@ -420,7 +420,7 @@
 	if (names->num_entries) {
 		int i;
 
-		oldnames->name = TALLOC_ARRAY(oldnames, LSA_TRANS_NAME, names->num_entries);
+		oldnames->name = TALLOC_ARRAY(mem_ctx, LSA_TRANS_NAME, names->num_entries);
 
 		if (!oldnames->name) {
 			return NT_STATUS_NO_MEMORY;
@@ -839,8 +839,8 @@
 		return status;
 	}
 
-	names->name = TALLOC_ARRAY(names, LSA_TRANS_NAME2, num_sids);
-	names->uni_name = TALLOC_ARRAY(names, UNISTR2, num_sids);
+	names->name = TALLOC_ARRAY(p->mem_ctx, LSA_TRANS_NAME2, num_sids);
+	names->uni_name = TALLOC_ARRAY(p->mem_ctx, UNISTR2, num_sids);
 	if ((names->name == NULL) || (names->uni_name == NULL)) {
 		return NT_STATUS_NO_MEMORY;
 	}

Modified: branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_nt.c
===================================================================
--- branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_nt.c	2007-06-09 00:18:07 UTC (rev 23401)
+++ branches/SAMBA_3_0_26/source/rpc_server/srv_lsa_nt.c	2007-06-09 00:27:28 UTC (rev 23402)
@@ -420,7 +420,7 @@
 	if (names->num_entries) {
 		int i;
 
-		oldnames->name = TALLOC_ARRAY(oldnames, LSA_TRANS_NAME, names->num_entries);
+		oldnames->name = TALLOC_ARRAY(mem_ctx, LSA_TRANS_NAME, names->num_entries);
 
 		if (!oldnames->name) {
 			return NT_STATUS_NO_MEMORY;
@@ -838,8 +838,8 @@
 		return status;
 	}
 
-	names->name = TALLOC_ARRAY(names, LSA_TRANS_NAME2, num_sids);
-	names->uni_name = TALLOC_ARRAY(names, UNISTR2, num_sids);
+	names->name = TALLOC_ARRAY(p->mem_ctx, LSA_TRANS_NAME2, num_sids);
+	names->uni_name = TALLOC_ARRAY(p->mem_ctx, UNISTR2, num_sids);
 	if ((names->name == NULL) || (names->uni_name == NULL)) {
 		return NT_STATUS_NO_MEMORY;
 	}



More information about the samba-cvs mailing list