From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix _IO_default_finish
Date: Fri, 13 Apr 2007 17:09:00 -0000 [thread overview]
Message-ID: <20070413171516.GI1826@sunsite.mff.cuni.cz> (raw)
Hi!
_IO_un_link calls flockfile/funlockfile, so I guess we shouldn't
destroy the lock before that.
2007-04-13 Jakub Jelinek <jakub@redhat.com>
* libio/genops.c (_IO_default_finish): Call _IO_lock_fini
after _IO_un_link, not before it.
--- libc/genops.c.jj 2007-01-17 11:18:43.000000000 +0100
+++ libc/genops.c 2007-04-13 19:04:23.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1997-2002, 2003, 2004, 2006
+/* Copyright (C) 1993,1995,1997-2002, 2003, 2004, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -696,12 +696,12 @@ _IO_default_finish (fp, dummy)
fp->_IO_save_base = NULL;
}
+ INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
+
#ifdef _IO_MTSAFE_IO
if (fp->_lock != NULL)
_IO_lock_fini (*fp->_lock);
#endif
-
- INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
}
INTDEF(_IO_default_finish)
Jakub
reply other threads:[~2007-04-13 17:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070413171516.GI1826@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).