Skip to content

Commit

Permalink
Merge pull request Samsung#954 from ravisankarg/master
Browse files Browse the repository at this point in the history
(tools): fix memory/resource leaks
  • Loading branch information
sunghan-chang authored Nov 15, 2017
2 parents fff1a8a + fb49f8c commit 6a831a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/ttrace_parser/scripts/parse_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ static int read_tracebuffer(FILE *file, int bufsize)

read_len = fread(buffer, sizeof(char), bufsize, file);
if (read_len < 0) {
free_tracebuffer(buffer);
return INVALID;
}

Expand Down Expand Up @@ -198,6 +199,7 @@ int main(int argc, char **args)

filesize = get_dumpsize(file);
if (filesize <= 0) {
close_dump(file);
return INVALID;
}

Expand Down

0 comments on commit 6a831a4

Please sign in to comment.