DRILL-1825: avoid memory leak