wireplumber/0003-m-mixer-api-Fix-memory-in-leak-wp_mixer_api_set_volume.patch
Antonio Larrosa 4208d2399f - Update to version 0.5.7:
* Highlights:
    - Fixed an issue that would cause random profile switching when
      an application was trying to capture from non-Bluetooth
      devices (#715, #634, !669)
    - Fixed an issue that would cause strange profile selection
      issues [choices not being remembered or unavailable routes
      being selected] (#734)
    - Added a timer that delays switching Bluetooth headsets to the
      HSP/HFP profile, avoiding needless rapid switching when an
      application is trying to probe device capabilities instead of
      actually capturing audio (!664)
    - Improved libcamera/v4l2 device deduplication logic to work
      with more complex devices (!674, !675, #689, #708)
  * Fixes:
    - Fixed two memory leaks in module-mixer-api and
      module-dbus-connection (!672, !673)
    - Fixed a crash that could occur in module-reserve-device
      (!680, #742)
    - Fixed an issue that would cause the warning
      "[string "alsa.lua"]:182: attempt to concatenate a nil value
      (local 'node_name')" to appear in the logs when an ALSA
      device was busy, breaking node name deduplication (!681)
    - Fixed an issue that could make find-preferred-profile.lua
      crash instead of properly applying profile priority rules
      (#751)
- Remove patches that are already included in 0.5.7:
  * 0001-autoswitch-bluetooth-profile-switch-only-Bluetooth-devices.patch
  * 0002-autoswitch-bluetooth-profile-Switch-to-HSP_HFP-on-timeout.patch
  * 0003-m-mixer-api-Fix-memory-in-leak-wp_mixer_api_set_volume.patch

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=89
2024-12-04 11:44:23 +00:00

37 lines
1.5 KiB
Diff

From 255b65d18204f7cf5c0706308196ffbcf8f1a697 Mon Sep 17 00:00:00 2001
From: Torkel Niklasson <torkel@axis.com>
Date: Thu, 26 Sep 2024 12:01:18 +0200
Subject: [PATCH] m-mixer-api: Fix memory in leak wp_mixer_api_set_volume
Declare result from wp_object_manager_lookup as g_autoptr, to prevent
leaking memory.
---
modules/module-mixer-api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/module-mixer-api.c b/modules/module-mixer-api.c
index e9dccbab0..502640c68 100644
--- a/modules/module-mixer-api.c
+++ b/modules/module-mixer-api.c
@@ -501,7 +501,7 @@ wp_mixer_api_set_volume (WpMixerApi * self, guint32 id, GVariant * vvolume)
props = wp_spa_pod_builder_end (b);
if (info->device_id != SPA_ID_INVALID) {
- WpPipewireObject *device = wp_object_manager_lookup (self->om,
+ g_autoptr (WpPipewireObject) device = wp_object_manager_lookup (self->om,
WP_TYPE_DEVICE, WP_CONSTRAINT_TYPE_G_PROPERTY,
"bound-id", "=u", info->device_id, NULL);
g_return_val_if_fail (device != NULL, FALSE);
@@ -514,7 +514,7 @@ wp_mixer_api_set_volume (WpMixerApi * self, guint32 id, GVariant * vvolume)
"save", "b", true,
NULL));
} else {
- WpPipewireObject *node = wp_object_manager_lookup (self->om,
+ g_autoptr (WpPipewireObject) node = wp_object_manager_lookup (self->om,
WP_TYPE_NODE, WP_CONSTRAINT_TYPE_G_PROPERTY,
"bound-id", "=u", id, NULL);
g_return_val_if_fail (node != NULL, FALSE);
--
GitLab