diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2008-02-14 23:25:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-15 23:21:56 -0800 |
commit | add8e8cee5054734cb19d918f83bcee649aab326 (patch) | |
tree | 65f2757e010dd84fd01a7e0f0b36a4e09a2829cf /http-push.c | |
parent | 0ef617f4b6ea78ad63dd11e90f8c854238176981 (diff) | |
download | git-add8e8cee5054734cb19d918f83bcee649aab326.tar.gz |
http-push: avoid invalid memory accesses
Before objects are sent, the respective ref is locked. However,
without this patch, the lock is lifted before the last object for
that ref was sent. As a consequence, the lock data was accessed
after the lock structure was free()d.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-push.c')
-rw-r--r-- | http-push.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/http-push.c b/http-push.c index b2b410df90..386b806f3e 100644 --- a/http-push.c +++ b/http-push.c @@ -2398,7 +2398,12 @@ int main(int argc, char **argv) fill_active_slots(); add_fill_function(NULL, fill_active_slot); #endif - finish_all_active_slots(); + do { + finish_all_active_slots(); +#ifdef USE_CURL_MULTI + fill_active_slots(); +#endif + } while (request_queue_head && !aborted); /* Update the remote branch if all went well */ if (aborted || !update_remote(ref->new_sha1, ref_lock)) { |