[PATCH] SAFE_FREE segfault in smbd/posix_acls.c

Jeremy Allison jra at samba.org
Fri Jan 25 09:34:04 GMT 2002


On Fri, Jan 25, 2002 at 04:22:08PM +0200, Alexander Bokovoy wrote:
> Attached patch fixes segfault in smbd/posix_acls.c:create_canon_ace_lists()
> when DEBUG message with log level 0 used a structure after SAFE_FREE().
> 
> 
> Index: posix_acls.c
> ===================================================================
> RCS file: /cvsroot/samba/source/smbd/posix_acls.c,v
> retrieving revision 1.56
> diff -u -r1.56 posix_acls.c
> --- posix_acls.c	11 Jan 2002 11:26:31 -0000	1.56
> +++ posix_acls.c	25 Jan 2002 14:21:31 -0000
> @@ -758,9 +758,9 @@
>  
>  			free_canon_ace_list(file_ace);
>  			free_canon_ace_list(dir_ace);
> -			SAFE_FREE(current_ace);
>  			DEBUG(0,("create_canon_ace_lists: unable to map SID %s to uid or gid.\n",
>  				sid_to_string(str, &current_ace->trustee) ));
> +			SAFE_FREE(current_ace);
>  			return False;
>  		}

Got it - thanks !

Jeremy.




More information about the samba-technical mailing list