ARROW-17213: [C++] Fix for valgrind issue in test-r-linux-valgrind crossbow build (#13715)
ARROW-17213: [C++] Fix for valgrind issue in test-r-linux-valgrind crossbow build (#13715)

Authored-by: Wes McKinney <039810fad096c61acdfe8791ea9d6e2d5461285b@apache.org>
Signed-off-by: Wes McKinney <039810fad096c61acdfe8791ea9d6e2d5461285b@apache.org>
kou/arrow,icexelloss/arrow,apache/arrow,apache/arrow,wesm/arrow,icexelloss/arrow,apache/arrow,wesm/arrow,apache/arrow,apache/arrow,kou/arrow,icexelloss/arrow,apache/arrow,icexelloss/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,apache/arrow,kou/arrow,wesm/arrow,kou/arrow,kou/arrow,wesm/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,wesm/arrow,icexelloss/arrow,apache/arrow,icexelloss/arrow,apache/arrow,apache/arrow,icexelloss/arrow,apache/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,icexelloss/arrow,wesm/arrow,kou/arrow,kou/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,kou/arrow,icexelloss/arrow,apache/arrow,kou/arrow,wesm/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,kou/arrow,wesm/arrow