summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlvklevankhanh <119659574+lvklevankhanh@users.noreply.github.com>2023-01-20 15:52:34 +0700
committerGitHub <noreply@github.com>2023-01-20 09:52:34 +0100
commit9b1f51cc173e74354b947336f69b371ef66a8940 (patch)
treee8315e76dc0846401c68dc6195151cf40bf11998
parent2224cddf140c060d92455ad3ee585e3abfc38eb2 (diff)
downloadDLT-daemon-9b1f51cc173e74354b947336f69b371ef66a8940.tar.gz
dlt-convert: Fix memory leak by calling dlt_file_free (#434)
Free the index which already allocated memory in dlt_file_read phase Signed-off-by: Le Van Khanh <Khanh.LeVan@vn.bosch.com>
-rw-r--r--src/console/dlt-convert.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/console/dlt-convert.c b/src/console/dlt-convert.c
index 30ea09a..b97a11f 100644
--- a/src/console/dlt-convert.c
+++ b/src/console/dlt-convert.c
@@ -420,6 +420,7 @@ int main(int argc, char *argv[])
if (ovalue)
close(ohandle);
+ dlt_file_free(&file, vflag);
return -1;
}
@@ -428,6 +429,7 @@ int main(int argc, char *argv[])
if (ovalue)
close(ohandle);
+ dlt_file_free(&file, vflag);
return -1;
}