Commit 132c2db6a9f839d7697e8bff05861a92825a9c7c

Sascha Cunz 2013-01-11T02:18:27

Fix possible free'ing of unitialized pointer in error case

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/clone.c b/src/clone.c
index 9012c04..32ac08b 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -29,7 +29,7 @@ static int create_branch(
 	const char *name)
 {
 	git_commit *head_obj = NULL;
-	git_reference *branch_ref;
+	git_reference *branch_ref = NULL;
 	int error;
 
 	/* Find the target commit */