[PATCH] memory leak fix in cli_pipe.c
Jeremy Allison
jra at samba.org
Mon Aug 4 02:39:24 GMT 2003
On Mon, Aug 04, 2003 at 12:06:53PM +1000, Tim Potter wrote:
> Can someone take a look at this and verify that it is correct? I would
> hate to put a horrible bug in cli_pipe.c at this late stage. (-:
>
> We are apparently losing 8 bytes of memory each time we create a rpc
> bind request. This is only done in client code (also I assume in the
> spoolss change notify back-channel) so it doesn't really have much of
> an impact.
>
>
> Tim.
>
> Index: rpc_client/cli_pipe.c
> ===================================================================
> RCS file: /data/cvs/samba/source/rpc_client/cli_pipe.c,v
> retrieving revision 1.79.2.33
> diff -u -r1.79.2.33 cli_pipe.c
> --- rpc_client/cli_pipe.c 30 Jul 2003 23:33:56 -0000 1.79.2.33
> +++ rpc_client/cli_pipe.c 4 Aug 2003 02:02:59 -0000
> @@ -751,6 +751,7 @@
> return NT_STATUS_NO_MEMORY;
> }
> }
> + prs_mem_free(&auth_info);
> return NT_STATUS_OK;
> }
Yeah, looks completely correct - please apply. Actually I don't
think it's losing 8 bytes as the prs_struct is created with the
talloc context associated with the rpc. So I'm pretty sure it's
always being freed. Still, the code matches the other exits :-).
Go for it.
Jeremy.
More information about the samba-technical
mailing list