svn commit: samba r19219 - in
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .
vlendec at samba.org
vlendec at samba.org
Tue Oct 10 07:52:31 GMT 2006
Author: vlendec
Date: 2006-10-10 07:52:31 +0000 (Tue, 10 Oct 2006)
New Revision: 19219
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19219
Log:
Fix a memleak in the generated srv_code.
Fix a warning.
Implement the rng_fault_state return check.
After this (and Jeremy's fix) all Samba3-developers should do a 'make idl' and
do a complete rebuild.
Volker
Modified:
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm 2006-10-10 07:37:03 UTC (rev 19218)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm 2006-10-10 07:52:31 UTC (rev 19219)
@@ -70,8 +70,10 @@
pidl "}";
pidl "";
pidl "pull = ndr_pull_init_blob(&blob, mem_ctx);";
- pidl "if (pull == NULL)";
+ pidl "if (pull == NULL) {";
+ pidl "\ttalloc_free(mem_ctx);";
pidl "\treturn False;";
+ pidl "}";
pidl "";
pidl "pull->flags |= LIBNDR_FLAG_REF_ALLOC;";
pidl "status = ndr_pull_$fn->{NAME}(pull, NDR_IN, &r);";
@@ -122,6 +124,12 @@
pidl "$ret;";
pidl "";
+ pidl "if (p->rng_fault_state) {";
+ pidl "\ttalloc_free(mem_ctx);";
+ pidl "\t/* Return True here, srv_pipe_hnd.c will take care */";
+ pidl "\treturn True;";
+ pidl "}";
+ pidl "";
pidl "if (DEBUGLEVEL >= 10)";
pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, &r);";
pidl "";
@@ -138,7 +146,7 @@
pidl "}";
pidl "";
pidl "blob = ndr_push_blob(push);";
- pidl "if (!prs_copy_data_in(&p->out_data.rdata, blob.data, (uint32)blob.length)) {";
+ pidl "if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {";
pidl "\ttalloc_free(mem_ctx);";
pidl "\treturn False;";
pidl "}";
More information about the samba-cvs
mailing list