diff options
| author | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-20 08:06:55 +0000 |
|---|---|---|
| committer | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-20 08:06:55 +0000 |
| commit | 79b5a450046b433f7c6080396ed0871f1b76ba28 (patch) | |
| tree | 51f2212f89d4a8218a5dde532921fa87a1b70216 /fs_test | |
| parent | 5b602a240ed1108ec6129518b6afd3c80b307a7a (diff) | |
fs_test/lwext4_generic: free rw_buff after use.
Diffstat (limited to 'fs_test')
| -rw-r--r-- | fs_test/lwext4_generic.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs_test/lwext4_generic.c b/fs_test/lwext4_generic.c index 9200388..21a4526 100644 --- a/fs_test/lwext4_generic.c +++ b/fs_test/lwext4_generic.c @@ -243,10 +243,16 @@ int main(int argc, char **argv) fflush(stdout); uint8_t *rw_buff = malloc(rw_szie); - if (!rw_buff) + if (!rw_buff) { + free(rw_buff); return EXIT_FAILURE; - if (!test_lwext4_file_test(rw_buff, rw_szie, rw_count)) + } + if (!test_lwext4_file_test(rw_buff, rw_szie, rw_count)) { + free(rw_buff); return EXIT_FAILURE; + } + + free(rw_buff); fflush(stdout); test_lwext4_dir_ls("/mp/"); |
