s4-lsa: Fix use-after-free in LSA server
This is a regression introduced in
ab7988aa2fd1a43f576a4b73a6893c61c7ef1957.
The state variable contains the data to be returned to the client
and packed into NDR after the function returned.
This memory needs to be kept (on mem_ctx as parent) until that is
pushed and freed by the caller.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13420
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry picked from commit
7e091e505156381e385235ab4518b4d133a98497)