[PATCH] Fix several memory and resource leaks

Andreas Schneider asn at samba.org
Thu Aug 9 15:18:35 UTC 2018


On Thursday, 9 August 2018 16:59:35 CEST jim via samba-technical wrote:
> This chunk looks wrong. Should it be close(newhandle)?

newhandle is a boolean ...
 
> On 8/9/2018 10:53 AM, Andreas Schneider via samba-technical wrote:
> > @@ -1181,6 +1182,9 @@ static int do_get(const char *rname, const char
> > *lname_in, bool reget)> 
> >   				      NULL);
> >   		
> >   		if(!NT_STATUS_IS_OK(status)) {
> >   		
> >   			d_printf("getattrib: %s\n", nt_errstr(status));
> > 
> > +			if (newhandle) {
> > +				close(handle);
> > +			}
> > 
> >   			return 1;
> >   		
> >   		}
> >   	
> >   	}


-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list