Commit cce966c3d8ee9a6175fc21f8ecc580fd6d19ee6e

Dan Tull 2020-10-06T17:51:14

Change bare free to allocator free. The info pointer was allocated with git__malloc, so needs to be free'd with git__free. This bug can lurk pretty easily since if there's no custom allocator this is fine.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/path.c b/src/path.c
index 0d0b40f..f271c53 100644
--- a/src/path.c
+++ b/src/path.c
@@ -2045,7 +2045,7 @@ int git_path_validate_system_file_ownership(const char *path)
 		git_error_set(GIT_ERROR_INVALID, "programdata configuration file owner is not valid");
 		ret = GIT_ERROR;
 	}
-	free(info);
+	git__free(info);
 
 cleanup:
 	if (descriptor)