Merge pull request #11762 from peterkovacs/patch-2

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