Skip to content

Commit

Permalink
dlt-convert: Fix memory leak by calling dlt_file_free (#434)
Browse files Browse the repository at this point in the history
Free the index which already allocated memory in dlt_file_read phase

Signed-off-by: Le Van Khanh <[email protected]>
  • Loading branch information
lvklevankhanh authored Jan 20, 2023
1 parent 2224cdd commit 9b1f51c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/console/dlt-convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ int main(int argc, char *argv[])
if (ovalue)
close(ohandle);

dlt_file_free(&file, vflag);
return -1;
}

Expand All @@ -428,6 +429,7 @@ int main(int argc, char *argv[])
if (ovalue)
close(ohandle);

dlt_file_free(&file, vflag);
return -1;
}

Expand Down

0 comments on commit 9b1f51c

Please sign in to comment.