add NT_STATUS_HAVE_NO_MEMORY_AND_FREE()
commitda3ee2790089e771689afbebef021a8c8c776306
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Jun 2009 07:25:47 +0000 (2 17:25 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 4 Jun 2009 04:10:10 +0000 (4 14:10 +1000)
treef12d7ba623fda6e492777310b2422f7165e82e7b
parent3ce37ae7505ec37d0d9bfb1fafe752a232741cca
add NT_STATUS_HAVE_NO_MEMORY_AND_FREE()

In many places we use NT_STATUS_HAVE_NO_MEMORY() to auto-return when a
memory allocation fails. In quite a few places where we use this, we
end up leaving a tmp_ctx behind, which creates a memory leak.

This macro takes a memory context to free when returning the error
libcli/util/ntstatus.h