author | Junio C Hamano <gitster@pobox.com> | |
Fri, 28 Sep 2007 08:46:13 +0000 (01:46 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 30 Sep 2007 06:54:37 +0000 (23:54 -0700) | ||
commit | 90446a0009d9c9c0a06c512f0836e0d30f78d2d0 | |
tree | f189f0e00b6626f9342d12d4ae9f9e0269b7dc0f | tree | snapshot |
parent | cfb8f898a883e2fb2fd5ecec0fe83662b64f1373 | commit | diff |
bundle transport: fix an alloc_ref() call
Currently alloc_ref() expects the length of the refname plus 1
as its parameter, prepares that much space and returns a "ref"
structure for the caller to fill the refname. One caller in
transport.c::get_refs_from_bundle() however allocated one byte
less.
It may be a good idea to change the calling convention to give
alloc_ref() the length of the refname, but that clean-up can be
done in a separate patch. This patch only fixes the bug and
makes all callers consistent.
There was also one overallocation in connect.c, which would not
hurt but was wasteful. This patch fixes it as well.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Currently alloc_ref() expects the length of the refname plus 1
as its parameter, prepares that much space and returns a "ref"
structure for the caller to fill the refname. One caller in
transport.c::get_refs_from_bundle() however allocated one byte
less.
It may be a good idea to change the calling convention to give
alloc_ref() the length of the refname, but that clean-up can be
done in a separate patch. This patch only fixes the bug and
makes all callers consistent.
There was also one overallocation in connect.c, which would not
hurt but was wasteful. This patch fixes it as well.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c | diff | blob | history | |
transport.c | diff | blob | history |