Memory leak in new rpc server infrastructure?
jra at samba.org
Wed Oct 4 19:23:47 GMT 2006
On Wed, Oct 04, 2006 at 09:22:23PM +0200, Volker Lendecke wrote:
> On Wed, Oct 04, 2006 at 09:14:21PM +0200, Jelmer Vernooij wrote:
> > I'll have a look at this on friday and see if I can get it fixed in
> > pidl. There shouldn't be a leak here though as it's allocated using
> > talloc.
> It's not the blob from the autogenerated code that leaks,
> it's the one from srv_pipe_hnd.c:662 that leaks, the
> autogenerated code unconditionally overwrites that.
> The problem is that the "old" code assumes this prior
Yeah the "old" server code has already initialized this
prs_struct with malloc'ed memory. The call to :
prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx_
needs to be changed to :
prs_copy_data_in(&p->out_data.rdata, blob.data, blob.length);
in the auto-generated code.
More information about the samba-technical