If the tag already exists and we are not forcing overwrite we need to free ref_name buffer before return the "tag already exists" error.