[SPARK-4663][sql]add finally to avoid resource leak

can you put the finally on the same line as the previous } ? thanks.