oberthur: Avoid memory leaks

Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23126
This commit is contained in:
Jakub Jelen 2020-06-08 14:55:03 +02:00 committed by Frank Morgner
parent 0a34d11cb7
commit 5e7d4fb8ba
1 changed files with 3 additions and 1 deletions

View File

@ -501,8 +501,10 @@ auth_select_file(struct sc_card *card, const struct sc_path *in_path,
sc_concatenate_path(&auth_current_ef->path, &auth_current_df->path, &path);
}
}
if (file_out)
if (file_out) {
sc_file_free(*file_out);
sc_file_dup(file_out, tmp_file);
}
sc_file_free(tmp_file);
}