[PATCH] Changed code to use proper talloc context instead of NULL to control memory leak.

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Jan 2 19:56:22 GMT 2009


On Fri, Jan 02, 2009 at 10:41:04PM +1100, scudette at gmail.com wrote:
> ---
>  source4/lib/registry/regf.c         |    2 +-
>  source4/lib/registry/tools/common.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
> index d6fb413..4cbcb09 100644
> --- a/source4/lib/registry/regf.c
> +++ b/source4/lib/registry/regf.c
> @@ -2045,7 +2045,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
>  	struct tdr_pull *pull;
>  	int i;
>  
> -	regf = (struct regf_data *)talloc_zero(NULL, struct regf_data);
> +	regf = (struct regf_data *)talloc_zero(parent_ctx, struct regf_data);

Thanks, pushed all three.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090102/537bed0b/attachment.bin


More information about the samba-technical mailing list