(_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:
@@ -316,7 +316,7 @@ _krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
|
|||||||
}
|
}
|
||||||
if (append == NULL) {
|
if (append == NULL) {
|
||||||
free(*res);
|
free(*res);
|
||||||
res = NULL;
|
*res = NULL;
|
||||||
krb5_set_error_string(context, "malloc - out of memory");
|
krb5_set_error_string(context, "malloc - out of memory");
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user