Commit 3dee36557e284003eb5e6f9328c5b40c6f600bdc

nulltoken 2012-11-13T07:04:30

local: fix memory leak

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/transports/local.c b/src/transports/local.c
index cbf6a4e..84acc79 100644
--- a/src/transports/local.c
+++ b/src/transports/local.c
@@ -227,6 +227,7 @@ static int local_negotiate_fetch(
 			git_oid_cpy(&rhead->loid, git_object_id(obj));
 		else if (error != GIT_ENOTFOUND)
 			return error;
+		git_object_free(obj);
 		giterr_clear();
 	}