[PATCH] [s3] possible memory leak in map_info6_to_validation

Christof Schmitt cs at samba.org
Fri Jun 15 15:40:01 UTC 2018


On Thu, Jun 14, 2018 at 03:28:53PM -0700, Jeremy Allison via samba-technical wrote:
> On Thu, Jun 14, 2018 at 09:22:39AM +0200, Swen Schillig via samba-technical wrote:
> > Please review and push if happy.
> > 
> > Thanks in advance.
> 
> LGTM, RB+. Can I get a second Team reviewer ?

RB+

Can you push this if you have other patches to push?

Christof

> 
> Jeremy.
> 
> > From cf42faa211b92d5edc62fe5fba9ccc8f79c0fc57 Mon Sep 17 00:00:00 2001
> > From: Swen Schillig <swen at vnet.ibm.com>
> > Date: Fri, 25 May 2018 10:06:21 +0200
> > Subject: [PATCH] [s3] possible memory leak in map_info6_to_validation
> > 
> > If the call to copy_netr_SamInfo6 returns an error status,
> > the allocated memory for "validation" needs to be free'd before returning.
> > 
> > Signed-off-by: Swen Schillig <swen at vnet.ibm.com>
> > ---
> >  source3/rpc_client/util_netlogon.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/source3/rpc_client/util_netlogon.c b/source3/rpc_client/util_netlogon.c
> > index 2d73bc95cea..c57979a1265 100644
> > --- a/source3/rpc_client/util_netlogon.c
> > +++ b/source3/rpc_client/util_netlogon.c
> > @@ -378,6 +378,7 @@ NTSTATUS map_info6_to_validation(TALLOC_CTX *mem_ctx,
> >  				    info6,
> >  				    &validation->sam6);
> >  	if (!NT_STATUS_IS_OK(status)) {
> > +		TALLOC_FREE(validation);
> >  		return status;
> >  	}
> >  
> > -- 
> > 2.14.4
> > 
> 
> 



More information about the samba-technical mailing list