(fcc_gen_new): fix a use after free, found by IBM checker.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16936 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -269,10 +269,11 @@ fcc_gen_new(krb5_context context, krb5_ccache *id)
|
|||||||
}
|
}
|
||||||
fd = mkstemp(file);
|
fd = mkstemp(file);
|
||||||
if(fd < 0) {
|
if(fd < 0) {
|
||||||
|
int ret = errno;
|
||||||
|
krb5_set_error_string(context, "mkstemp %s", file);
|
||||||
free(f);
|
free(f);
|
||||||
free(file);
|
free(file);
|
||||||
krb5_set_error_string(context, "mkstemp %s", file);
|
return ret;
|
||||||
return errno;
|
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
f->filename = file;
|
f->filename = file;
|
||||||
|
Reference in New Issue
Block a user