Free error message returned by krb5_get_error_message
authorAlexandra Ellwood <lxs@mit.edu>
Tue, 14 Oct 2008 16:52:39 +0000 (16:52 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Tue, 14 Oct 2008 16:52:39 +0000 (16:52 +0000)
ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20866 dc483132-0cff-0310-8789-dd5450dbe970

src/kim/lib/kim_error_message.c

index b292505c4cc8592fdcd5429db75bf79975661d9a..49f26301db98c5c6924187148b2997f69cc52f17 100644 (file)
@@ -174,6 +174,8 @@ kim_error kim_error_set_message_for_krb5_error (krb5_context    in_context,
         const char *message = krb5_get_error_message (in_context, in_code);
         
         err = kim_error_set_message (in_code, message);
+        
+        if (message) { krb5_free_error_message (in_context, message); }
     }
     
     return err ? err : in_code;