Skip to content

Commit

Permalink
Fix memory leak on tmp_buf
Browse files Browse the repository at this point in the history
tmp_buf is allocated but not free'd, causing a minor memory leak

Signed-off-by: Colin Ian King <[email protected]>
  • Loading branch information
Colin Ian King committed Nov 14, 2016
1 parent 206c546 commit 471bb52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions oslib/libmtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,7 @@ static int legacy_auto_oob_layout(const struct mtd_dev_info *mtd, int fd,
len = mtd->oob_size - start;
memcpy(oob + start, tmp_buf + start, len);
}
free(tmp_buf);

return 0;
}
Expand Down

0 comments on commit 471bb52

Please sign in to comment.