]> git.decadent.org.uk Git - nfs-utils.git/commit
gssd: free buffer allocated by gssd_k5_err_msg
authorJeff Layton <jlayton@redhat.com>
Mon, 23 Mar 2009 12:12:37 +0000 (08:12 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 23 Mar 2009 12:12:37 +0000 (08:12 -0400)
commit38062464a09868ff579b3c3c0b43fcd550ea3c61
tree2786b9e74b96eb6eb95df50d28eb8f8a2987811f
parent7f1f9985cf510b087e7a817597094acba9143795
gssd: free buffer allocated by gssd_k5_err_msg

There's no way for the caller of gssd_k5_err_msg to know whether to free
the string it returns. It can call krb5_get_error_message which returns
a string that must be freed via krb5_free_error_string. The other ways
that it can return a string require that the memory not be freed.

Deal with this by copying the string to a new buffer in all cases. Then
we can properly free the string allocated by krb5_get_error_message.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/context_heimdal.c
utils/gssd/krb5_util.c
utils/gssd/krb5_util.h