mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 03:57:34 +08:00
sd_bench:Missing free
This commit is contained in:
committed by
Daniel Agar
parent
c2cbab1e98
commit
ade7315e9b
@@ -297,6 +297,7 @@ int read_test(int fd, sdb_config_t *cfg, uint8_t *block, int block_size)
|
||||
|
||||
if ((int)nread != block_size) {
|
||||
PX4_ERR("Read error");
|
||||
free(read_block);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -330,5 +331,6 @@ int read_test(int fd, sdb_config_t *cfg, uint8_t *block, int block_size)
|
||||
|
||||
PX4_INFO(" Avg : %8.2lf KB/s %d blocks read and verified", (double)block_size * total_blocks / total_elapsed / 1024.,
|
||||
total_blocks);
|
||||
free(read_block);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user