]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
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)
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>

No differences found