ref: 79b5a450046b433f7c6080396ed0871f1b76ba28
parent: 5b602a240ed1108ec6129518b6afd3c80b307a7a
author: ngkaho1234 <[email protected]>
date: Sun Dec 20 03:06:55 EST 2015
fs_test/lwext4_generic: free rw_buff after use.
--- a/fs_test/lwext4_generic.c
+++ b/fs_test/lwext4_generic.c
@@ -243,10 +243,16 @@
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/");