ARROW-8438: [C++] Fix crash in io-memory-benchmark
ARROW-8438: [C++] Fix crash in io-memory-benchmark

Closes #6929 from pitrou/ARROW-8438-fix-io-mem-benchmark

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

apache/arrow,wesm/arrow,kou/arrow,laurentgo/arrow,icexelloss/arrow,cpcloud/arrow,wesm/arrow,wesm/arrow,laurentgo/arrow,icexelloss/arrow,icexelloss/arrow,xhochy/arrow,apache/arrow,laurentgo/arrow,laurentgo/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,kou/arrow,kou/arrow,apache/arrow,wesm/arrow,xhochy/arrow,laurentgo/arrow,wesm/arrow,laurentgo/arrow,kou/arrow,laurentgo/arrow,kou/arrow,icexelloss/arrow,kou/arrow,xhochy/arrow,xhochy/arrow,kou/arrow,xhochy/arrow,xhochy/arrow,xhochy/arrow,cpcloud/arrow,cpcloud/arrow,wesm/arrow,cpcloud/arrow,cpcloud/arrow,icexelloss/arrow,wesm/arrow,xhochy/arrow,wesm/arrow,xhochy/arrow,cpcloud/arrow,apache/arrow,cpcloud/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,icexelloss/arrow,icexelloss/arrow,kou/arrow,apache/arrow,icexelloss/arrow,cpcloud/arrow,wesm/arrow,laurentgo/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,apache/arrow,kou/arrow,kou/arrow,laurentgo/arrow,icexelloss/arrow,cpcloud/arrow,cpcloud/arrow,xhochy/arrow,kou/arrow,laurentgo/arrow,cpcloud/arrow,cpcloud/arrow,apache/arrow,laurentgo/arrow,kou/arrow,xhochy/arrow,xhochy/arrow,xhochy/arrow,wesm/arrow,cpcloud/arrow,apache/arrow,apache/arrow,xhochy/arrow,laurentgo/arrow,cpcloud/arrow,icexelloss/arrow,laurentgo/arrow,wesm/arrow,xhochy/arrow,apache/arrow,laurentgo/arrow,apache/arrow,apache/arrow,icexelloss/arrow,apache/arrow,laurentgo/arrow