The VIR_FREE(tmp) could be unconditional, but it doesn't hurt to leave
it conditional - at any rate, it won't trip the syntax-check for
useless-if-before-free because we are doing more than just freeing tmp
in the conditional.