gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
authorAndrew Bartlett <abartlet@samba.org>
Mon, 1 Aug 2011 05:39:01 +0000 (15:39 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 3 Aug 2011 08:48:02 +0000 (18:48 +1000)
This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.

Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.

Andrew Bartlett


No differences found