return NT_STATUS_UNSUCCESSFUL;
}
- /* Can't use the talloc version here, because the returned struct gets
- kept on the server_info */
+ /* the returned struct gets kept on the server_info, by means
+ of a steal further down */
if ( !(sampass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
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;
}