diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2018-02-01 09:39:02 +0100 |
---|---|---|
committer | Christof Schmitt <cs@samba.org> | 2018-03-03 00:00:34 +0100 |
commit | e01d7d9d0f76b5624bc10d94965fad8f22b4ea7b (patch) | |
tree | 8d1aeba05bd4ef627933dd6db75e7b9d3624ad42 /source4/libnet/libnet_lookup.c | |
parent | 6d0b6e937a55c55797f1d1136c3f75d27d6fa0d3 (diff) | |
download | samba-e01d7d9d0f76b5624bc10d94965fad8f22b4ea7b.tar.gz |
Replace NT_STATUS_HAVE_NO_MEMORY macro
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
Diffstat (limited to 'source4/libnet/libnet_lookup.c')
-rw-r--r-- | source4/libnet/libnet_lookup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index c4befcacda9..63ce6015b66 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -419,9 +419,15 @@ NTSTATUS libnet_LookupName_recv(struct composite_context *c, TALLOC_CTX *mem_ctx 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: |