diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-04-02 05:53:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:03 -0500 |
commit | ccc06f84415a0496b8f3771e8888f81442acd808 (patch) | |
tree | ba6cdd8ef0b98126ff07f9658510ab87c4bf12ba /source3/auth/auth_util.c | |
parent | fb3835846ef89a632230ff808259dad1cddc05c0 (diff) | |
download | samba-ccc06f84415a0496b8f3771e8888f81442acd808.tar.gz samba-ccc06f84415a0496b8f3771e8888f81442acd808.tar.xz samba-ccc06f84415a0496b8f3771e8888f81442acd808.zip |
r22022: - Clarify the comments
- make sure never to free an uninitialised variable
- ensure to free result on getpwnam_alloc failure
Andrew Bartlett
(This used to be commit 5fe3328e66661371182cc1c3b6e239797c3b4f93)
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r-- | source3/auth/auth_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 5c3bf7acce..7891ce1599 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -562,13 +562,13 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info, if ( !(result = make_server_info(NULL)) ) { - TALLOC_FREE(pwd); return NT_STATUS_NO_MEMORY; } if ( !(pwd = getpwnam_alloc(result, pdb_get_username(sampass))) ) { DEBUG(1, ("User %s in passdb, but getpwnam() fails!\n", pdb_get_username(sampass))); + TALLOC_FREE(result); return NT_STATUS_NO_SUCH_USER; } |