From: Alex Riesen <raa.lkml@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Clemens Buchacher" <drizzd@aon.at>,
"Serhat Şevki Dinçer" <jfcgauss@gmail.com>
Subject: Re: y.a. static code analysis
Date: Sun, 24 May 2009 15:16:49 +0200 [thread overview]
Message-ID: <20090524131648.GA22800@blimp.localdomain> (raw)
In-Reply-To: <81b0412b0905240604q3c8c798bi6ad64d8916b4cd9e@mail.gmail.com>
Noticed and reported by Serhat Şevki Dinçer.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Alex Riesen, Sun, May 24, 2009 15:04:06 +0200:
> 2009/5/23 Serhat Şevki Dinçer <jfcgauss@gmail.com>:
>
> > [./http-push.c:1419]: (error) Using 'lock' after it is deallocated / released
>
> This is the only real bug.
>
Here's a fix.
http-push.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/http-push.c b/http-push.c
index dac2c6e..45e8a69 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1415,8 +1415,9 @@ static void remove_locks(void)
fprintf(stderr, "Removing remote locks...\n");
while (lock) {
+ struct remote_lock *next = lock->next;
unlock_remote(lock);
- lock = lock->next;
+ lock = next;
}
}
--
1.6.3.1.93.g316b2
next prev parent reply other threads:[~2009-05-24 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-23 19:00 y.a. static code analysis Serhat Şevki Dinçer
2009-05-24 13:04 ` Alex Riesen
2009-05-24 13:16 ` Alex Riesen [this message]
2009-05-24 13:25 ` Clemens Buchacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090524131648.GA22800@blimp.localdomain \
--to=raa.lkml@gmail.com \
--cc=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jfcgauss@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).