Revert "update: don't free the temp pointer, but free the original instead."