Free result_metadata directly instead of freeing 2nd, redundant call.

`result_metadata` returns a new object each time it is called, so calling `result_metadata.free` is essentially a noop.  Instead call `free` directly on the metadata when we're done with it.
Merge pull request #11762 from peterkovacs/patch-2

Free result_metadata directly instead of freeing 2nd, redundant call.