diff options
| author | NIIBE Yutaka <[email protected]> | 2026-10-14 04:10:29 +0200 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2026-10-22 03:06:11 +0200 |
| commit | 2e3b31d565c65ec43b398c02635bcec085e23808 (patch) | |
| tree | 4a98e8e59cb75b437f63466cb2947edfd5a397c8 /src | |
| parent | Fix gpgrt_ftrylockfile. (diff) | |
| download | libgpg-error-2e3b31d565c65ec43b398c02635bcec085e23808.tar.gz libgpg-error-2e3b31d565c65ec43b398c02635bcec085e23808.zip | |
* src/estream.c (_gpgrt_fflush): Skip the read-only stream.
--
GnuPG-bug-id: 8518
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/estream.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/estream.c b/src/estream.c index 301a078..24e82d8 100644 --- a/src/estream.c +++ b/src/estream.c @@ -4578,9 +4578,12 @@ _gpgrt_fflush (estream_t stream, int in_atexit) for (item = estream_list; item; item = item->next) if (item->stream) { + if (in_atexit && !item->stream->flags.writing) + /* Skip read-only stream */ + continue; + /* The code below does not work - we need to think more about * atexit handlers and stream locking. */ - (void)in_atexit; /* if (in_atexit) */ /* { */ /* /\* Do not flush if we can't take the lock while we are */ |
