issue with krb5_prompter_posix() design

Greg Hudson ghudson at MIT.EDU
Thu Apr 15 17:50:44 EDT 2010

On Thu, 2010-04-15 at 17:03 -0400, Nicolas Williams wrote:
> I'm not so sure.  On the one hand the conv/prompter function will know
> how much memory to allocate, not the caller of the prompting function.
> OTOH requiring the prompting function to free() memory allocated by the
> prompter means that the application and the library must share the same
> memory allocator

Yes, but if krb5_prompter_posix() had been designed to allocate the
memory, the caller would probably free it with krb5_free_data() (or
krb5_free_data_contents(), perhaps), so the actual free would happen
inside the library.

I chose not to complicate my message with that detail, but only
succeeded in adding three more messages to the thread. :)

More information about the krbdev mailing list