Update src/libgit2/tag.c
diff --git a/src/libgit2/tag.c b/src/libgit2/tag.c
index 3d8f8bf..792155a 100644
--- a/src/libgit2/tag.c
+++ b/src/libgit2/tag.c
@@ -554,6 +554,8 @@ int git_tag_name_is_valid(int *valid, const char *name)
GIT_ASSERT(valid);
+ *valid = 0;
+
if (!name || !tag_name_is_valid(name))
goto done;