Replaced NT_STATUS_HAVE_NO_MEMORY macro and fixed
memory leaking error-path.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Sat Mar 3 00:00:34 CET 2018 on sn-devel-144
if (domains->count > 0) {
io->out.sid = dom_sid_add_rid(mem_ctx, domains->domains[0].sid,
io->out.rid);
- NT_STATUS_HAVE_NO_MEMORY(io->out.sid);
+ if (io->out.sid == NULL) {
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
io->out.sidstr = dom_sid_string(mem_ctx, io->out.sid);
- NT_STATUS_HAVE_NO_MEMORY(io->out.sidstr);
+ if (io->out.sidstr == NULL) {
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
}
success: