From: Alex Riesen Date: Sun, 24 May 2009 13:16:49 GMT Subject: Re: y.a. static code analysis Message-ID: <20090524131648.GA22800@blimp.localdomain> In-Reply-To: <81b0412b0905240604q3c8c798bi6ad64d8916b4cd9e@mail.gmail.com> Noticed and reported by Serhat Şevki Dinçer. Signed-off-by: Alex Riesen --- Alex Riesen, Sun, May 24, 2009 15:04:06 +0200: > 2009/5/23 Serhat Şevki Dinçer : > > > [./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