fsstress: fix memory leak in do_aio_rw
authorZorro Lang <zlang@redhat.com>
Fri, 11 Sep 2020 07:15:53 +0000 (15:15 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 27 Sep 2020 09:31:18 +0000 (17:31 +0800)
commit7f9458a36f9bec49ec7a21f01d388d7f60a53b34
treedc06404ceec542c74dc0b2adcf877e2c9475635c
parent4cf0a1e57cdc855d8bdce3a8249fca4b4c8a7904
fsstress: fix memory leak in do_aio_rw

If io_submit or io_getevents fails, the do_aio_rw() won't free the
"buf" and cause memory leak.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
ltp/fsstress.c