Commit d1aee4775aba1a320cb3bb12753168ce8a35fb74

nulltoken 2013-01-06T15:09:27

clone: Fix a memory leak

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/clone.c b/src/clone.c
index ff586a6..c2e724c 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -333,6 +333,7 @@ static int setup_remotes_and_fetch(
 			}
 			git_remote_disconnect(origin);
 		}
+		git_remote_free(origin);
 	}
 
 	return retcode;