svn commit: samba r13727 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

Gerald (Jerry) Carter jerry at samba.org
Tue Feb 28 13:36:20 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vlendec at samba.org wrote:
> Author: vlendec
> Date: 2006-02-27 21:19:58 +0000 (Mon, 27 Feb 2006)
> New Revision: 13727
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13727
> 
> Log:
> Fix a segfault

> Changeset:
> Modified: branches/SAMBA_3_0/source/passdb/pdb_interface.c
> ===================================================================
> --- branches/SAMBA_3_0/source/passdb/pdb_interface.c	2006-02-27 19:55:21 UTC (rev 13726)
> +++ branches/SAMBA_3_0/source/passdb/pdb_interface.c	2006-02-27 21:19:58 UTC (rev 13727)
> @@ -342,10 +342,14 @@
>  					TALLOC_CTX *tmp_ctx, const char *name,
>  					uint32 acb_info, uint32 *rid)
>  {
> -	struct samu *sam_pass = NULL;
> +	struct samu *sam_pass;
>  	NTSTATUS status;
>  	struct passwd *pwd;
>  
> +	if ((sam_pass = TALLOC_ZERO_P(tmp_ctx, struct samu)) == NULL) {
> +		return NT_STATUS_NO_MEMORY;
> +	}
> +


Volker, the current code provides samu_new( CTX ) rather than calling
talloc() directly.  Mostly this is just to handle initialization
of the structure fields.





cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEBFHTIR7qMdg1EfYRAvgbAJ9VwmvXIV4ukF2glQJm0RtP5jU5vwCfZ0GM
gdfbIoBvBXXam9/Vp+HTViw=
=8JZA
-----END PGP SIGNATURE-----


More information about the samba-cvs mailing list