In rpz system tests, we could leak file if the applying the updates has failed. Add the missing fclose() before returning.