alsa/0016-pcm_file-call-pclose-correctly-for-popen-coverity.patch
Takashi Iwai 4f970fe93d Accepting request 706089 from home:tiwai:branches:multimedia:libs
- Remove hackish modprobe install scripts for auto-loading OSS and
  sequencer modules (bsc#1136562);
  it's invoked from systemd unit file included in alsa-utils now
- Backport upstream fixes:
  0001-pcm-direct-Add-generic-hw_ptr_alignment-function-for.patch
  0002-pcm-dshare-Added-hw_ptr_alignment-option-in-configur.patch
  0003-pcm-dsnoop-Added-hw_ptr_alignment-option-in-configur.patch
  0004-pcm-file-add-support-for-infile-reading-in-non-inter.patch
  0005-pcm-file-use-snd_pcm_file_areas_read_infile-for-read.patch
  0006-pcm-file-add-missing-unlock-on-early-return.patch
  0007-ucm-Add-UCM-profile-for-CX2072X-codec-on-Baytrail-Ch.patch
  0008-pcm-add-mmap_begin-callback-to-snd_pcm_fast_ops_t-ap.patch
  0009-pcm-file-add-infile-read-support-for-mmap-mode.patch
  0010-aserver-fix-resource-leak-coverity.patch
  0011-src-conf.c-add-missing-va_end-call-coverity.patch
  0012-config-parse_string-fix-the-dynamic-buffer-allocatio.patch
  0013-control_shm-remove-duplicate-code-coverity.patch
  0014-control_shm-add-missing-socket-close-to-the-error-pa.patch
  0015-pcm-fix-memory-leak-in-_snd_pcm_parse_config_chmaps-.patch
  0016-pcm_file-call-pclose-correctly-for-popen-coverity.patch
  0017-pcm_hw-close-file-descriptor-in-the-error-path-in-sn.patch
  0018-rawmidi-use-snd_dlobj_cache_get2-in-rawmidi-open-cov.patch
  0019-rawmidi_hw-add-sanity-check-for-the-invalid-stream-a.patch
  0020-topology-various-coverity-fixes.patch
  0021-ucm-coverity-fixes.patch
  0022-pcm_file-coverity-fixes-including-double-locking.patch
  0023-topology-next-round-of-coverity-fixes.patch
  0024-pcm_file-another-locking-fix-coverity.patch
  0025-ucm-another-coverity-fix-in-uc_mgr_config_load.patch
- Drop the downstream CX2072X UCM profile, which is replaced with

OBS-URL: https://build.opensuse.org/request/show/706089
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=253
2019-05-28 18:54:09 +00:00

35 lines
951 B
Diff

From 22ade9b8c150240a960ca683ee6d8f53ce8bc6ea Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Fri, 24 May 2019 11:09:43 +0200
Subject: [PATCH 16/25] pcm_file: call pclose() correctly for popen()
(coverity)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/pcm/pcm_file.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
index 52cc10a9436a..99db3754fa32 100644
--- a/src/pcm/pcm_file.c
+++ b/src/pcm/pcm_file.c
@@ -227,7 +227,14 @@ static int snd_pcm_file_open_output_file(snd_pcm_file_t *file)
file->final_fname);
return -errno;
}
- fd = fileno(pipe);
+ fd = dup(fileno(pipe));
+ err = -errno;
+ pclose(pipe);
+ if (fd < 0) {
+ SYSERR("unable to dup pipe file handle for command %s",
+ file->final_fname);
+ return err;
+ }
} else {
if (file->trunc)
fd = open(file->final_fname, O_WRONLY|O_CREAT|O_TRUNC,
--
2.16.4