[PATCH] Minor cleanup to libnet_join_member
Volker Lendecke
Volker.Lendecke at SerNet.DE
Thu Jan 25 11:13:10 UTC 2018
On Thu, Jan 25, 2018 at 12:11:01PM +0100, David Disseldorp via samba-technical wrote:
> On Thu, 25 Jan 2018 11:23:26 +0100, Swen Schillig via samba-technical wrote:
>
> > status = libnet_JoinDomain(ctx, r2, r2);
> > if (!NT_STATUS_IS_OK(status)) {
> > r->out.error_string = talloc_steal(mem_ctx, r2->out.error_string);
> > - talloc_free(tmp_mem);
> > - return status;
> > + goto out;
> > }
> >
> > set_secrets = talloc_zero(tmp_mem,
> > struct provision_store_self_join_settings);
> > if (!set_secrets) {
> > - r->out.error_string = NULL;
> > - talloc_free(tmp_mem);
> > - return NT_STATUS_NO_MEMORY;
> > + goto out;
> > }
>
> This will return NT_STATUS_OK on talloc failure. My preference would be
> to explicitly set status immediately prior to each enomem goto.
Thanks for this catch.
Volker
--
Besuchen Sie die verinice.XP 2018 in Berlin,
Anwenderkonferenz für Informationssicherheit
vom 21.-23.03.2018 im Sofitel Kurfürstendamm
Info & Anmeldung hier: http://veriniceXP.org
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list