Skip to content

Commit

Permalink
Fix wrong variable was used in the loop. Causing potential memory leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Jun 5, 2023
1 parent fc39449 commit 3627ab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tinyexr.h
Original file line number Diff line number Diff line change
Expand Up @@ -8638,7 +8638,7 @@ int ParseEXRMultipartHeaderFromMemory(EXRHeader ***exr_headers,
if (!ConvertHeader(exr_header, infos[i], &warn, &_err)) {

// Free malloc-allocated memory here.
for (size_t k = 0; k < infos[i].attributes.size(); i++) {
for (size_t k = 0; k < infos[i].attributes.size(); k++) {
if (infos[i].attributes[k].value) {
free(infos[i].attributes[k].value);
}
Expand Down

0 comments on commit 3627ab3

Please sign in to comment.