SHA256
1
0
forked from pool/alsa-utils
alsa-utils/0021-topology-fix-possible-double-free-in-load.patch
Takashi Iwai f936d7ca95 Accepting request 865332 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes:
  various fixes in aplay, alsamixer, alsactl and alsaloop, updated
  translations, etc:
  0001-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch
  0002-alsamixer-Fix-the-mixer-views-description-in-man-pag.patch
  0003-Add-Slovak-translation.patch
  0004-Add-Basque-translation.patch
  0006-aplay-cosmetic-code-fix-in-xrun.patch
  0007-aplay-fix-the-CPU-busy-loop-in-the-pause-handler.patch
  0008-alsa-info-Add-lsusb-and-stream-outputs.patch
  0013-aplay-add-test-code-for-snd_pcm_status-to-test-posit.patch
  0014-ucm-fix-typo-in-docs.patch
  0015-aplay-add-avail-delay-checks-to-test-position.patch
  0016-alsactl-daemon-read_pid_file-fix-the-returned-code-o.patch
  0017-alsactl-init-set_ctl_value-fix-bytes-parsing.patch
  0018-alsactl-init-parse-fix-possible-double-free.patch
  0019-alsaloop-fix-possible-memory-leak-in-create_loopback.patch
  0020-alsaloop-get_queued_playback_samples-simplify-code.patch
  0021-topology-fix-possible-double-free-in-load.patch
  0022-alsamixer-remove-dead-fcn-widget_handle_key-in-widge.patch
  0023-alsamixer-remove-unused-variable-y-in-display_scroll.patch
  0024-alsamixer-fix-shift-in-parse_words.patch
  0025-aplay-fix-the-test-position-test-for-playback-avail-.patch

OBS-URL: https://build.opensuse.org/request/show/865332
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=188
2021-01-21 10:13:28 +00:00

30 lines
775 B
Diff

From 88513212c564fb8cbcbbb43f433d73cb4db786e5 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Fri, 8 Jan 2021 18:33:28 +0100
Subject: [PATCH 21/25] topology: fix possible double free in load()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
topology/topology.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/topology/topology.c b/topology/topology.c
index d52b1452fdc2..c2f094324266 100644
--- a/topology/topology.c
+++ b/topology/topology.c
@@ -100,10 +100,8 @@ static int load(const char *source_file, void **dst, size_t *dst_size)
pos += r;
size += 8*1024;
buf2 = realloc(buf, size);
- if (buf2 == NULL) {
- free(buf);
+ if (buf2 == NULL)
goto _nomem;
- }
buf = buf2;
}
if (r < 0) {
--
2.26.2