diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2007-07-10 06:47:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-10 08:39:59 +0200 |
commit | dfd255dd1a7c04ad24891db50e5d80d96f93fd4a (patch) | |
tree | 0a7640ebb74f4f2b60ccc1dbc7cc87070b777f04 /connect.c | |
parent | Makefile: rebuild git.o on version change, clean up git$X flags (diff) | |
download | git-dfd255dd1a7c04ad24891db50e5d80d96f93fd4a.tar.xz git-dfd255dd1a7c04ad24891db50e5d80d96f93fd4a.zip |
Add allocation and freeing functions for struct refs
Instead of open-coding allocation wherever it happens, have a function.
Also, add a function to free a list of refs, which we currently never
actually do.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -72,7 +72,7 @@ struct ref **get_remote_heads(int in, struct ref **list, continue; if (nr_match && !path_match(name, nr_match, match)) continue; - ref = xcalloc(1, sizeof(*ref) + len - 40); + ref = alloc_ref(len - 40); hashcpy(ref->old_sha1, old_sha1); memcpy(ref->name, buffer + 41, len - 40); *list = ref; |