Author: metze Date: 2007-12-12 10:13:08 +0000 (Wed, 12 Dec 2007) New Revision: 26413
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26413 Log: we should check the return value of talloc_reference() metze Modified: branches/SAMBA_4_0/source/auth/auth_util.c Changeset: Modified: branches/SAMBA_4_0/source/auth/auth_util.c =================================================================== --- branches/SAMBA_4_0/source/auth/auth_util.c 2007-12-12 07:02:07 UTC (rev 26412) +++ branches/SAMBA_4_0/source/auth/auth_util.c 2007-12-12 10:13:08 UTC (rev 26413) @@ -81,7 +81,9 @@ if (!*user_info_mapped) { return NT_STATUS_NO_MEMORY; } - talloc_reference(*user_info_mapped, user_info); + if (!talloc_reference(*user_info_mapped, user_info)) { + return NT_STATUS_NO_MEMORY; + } **user_info_mapped = *user_info; (*user_info_mapped)->mapped_state = true; (*user_info_mapped)->mapped.domain_name = talloc_strdup(*user_info_mapped, domain); @@ -129,7 +131,9 @@ if (!user_info_temp) { return NT_STATUS_NO_MEMORY; } - talloc_reference(user_info_temp, user_info_in); + if (!talloc_reference(user_info_temp, user_info_in)) { + return NT_STATUS_NO_MEMORY; + } *user_info_temp = *user_info_in; user_info_temp->mapped_state = to_state; @@ -193,7 +197,9 @@ if (!user_info_temp) { return NT_STATUS_NO_MEMORY; } - talloc_reference(user_info_temp, user_info_in); + if (!talloc_reference(user_info_temp, user_info_in)) { + return NT_STATUS_NO_MEMORY; + } *user_info_temp = *user_info_in; user_info_temp->mapped_state = to_state;