(_krb5_expand_default_cc_name): avoid return pointer to freed memory

in the error case. Found by IBM checker.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16932 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-02 00:52:26 +00:00
parent 4c3ff70933
commit 5ac7ec3e3e

View File

@@ -316,7 +316,7 @@ _krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
}
if (append == NULL) {
free(*res);
res = NULL;
*res = NULL;
krb5_set_error_string(context, "malloc - out of memory");
return ENOMEM;
}