mirror of
git://slackware.nl/current.git
synced 2025-01-03 23:03:22 +01:00
646a5c1cbf
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
80 lines
2.2 KiB
Diff
80 lines
2.2 KiB
Diff
From ac129e178c24d7ec79b020a7912cc680a6008c5b Mon Sep 17 00:00:00 2001
|
|
From: Steve Dodier-Lazaro <sidnioulz@gmail.com>
|
|
Date: Wed, 10 Dec 2014 03:38:32 +0000
|
|
Subject: [PATCH 3/3] Removing edge-case memleaks
|
|
|
|
---
|
|
src/main.c | 2 +-
|
|
src/xvd_mixer.c | 30 ++++++++++++++++++------------
|
|
2 files changed, 19 insertions(+), 13 deletions(-)
|
|
|
|
diff --git a/src/main.c b/src/main.c
|
|
index 18e8e01..d04920c 100644
|
|
--- a/src/main.c
|
|
+++ b/src/main.c
|
|
@@ -81,7 +81,7 @@ xvd_shutdown()
|
|
xvd_keys_release (Inst);
|
|
xvd_xfconf_shutdown (Inst);
|
|
|
|
- //TODO xvd_instance_free
|
|
+ g_free (Inst);
|
|
}
|
|
|
|
static void
|
|
diff --git a/src/xvd_mixer.c b/src/xvd_mixer.c
|
|
index 1d580bf..cef3151 100644
|
|
--- a/src/xvd_mixer.c
|
|
+++ b/src/xvd_mixer.c
|
|
@@ -102,31 +102,37 @@ _xvd_mixer_bus_message (GstBus *bus, GstMessage *message,
|
|
{
|
|
gst_mixer_message_parse_mute_toggled (message, &msg_track, &Inst->muted);
|
|
g_object_get (msg_track, "label", &label, NULL);
|
|
- if (g_strcmp0 (Inst->track_label, label) != 0)
|
|
- return;
|
|
+
|
|
+ if (g_strcmp0 (Inst->track_label, label) == 0)
|
|
+ {
|
|
#ifdef HAVE_LIBNOTIFY
|
|
- if (Inst->muted)
|
|
- xvd_notify_notification (Inst, "audio-volume-muted", 0);
|
|
- else {
|
|
- xvd_mixer_init_volume (Inst);
|
|
- xvd_notify_volume_notification (Inst);
|
|
+ if (Inst->muted)
|
|
+ xvd_notify_notification (Inst, "audio-volume-muted", 0);
|
|
+ else {
|
|
+ xvd_mixer_init_volume (Inst);
|
|
+ xvd_notify_volume_notification (Inst);
|
|
#endif
|
|
+ }
|
|
}
|
|
+
|
|
g_free (label);
|
|
}
|
|
else if (type == GST_MIXER_MESSAGE_VOLUME_CHANGED)
|
|
{
|
|
gst_mixer_message_parse_volume_changed (message, &msg_track, &volumes, &num_channels);
|
|
g_object_get (msg_track, "label", &label, NULL);
|
|
- if (g_strcmp0 (Inst->track_label, label) != 0)
|
|
- return;
|
|
- xvd_calculate_avg_volume (Inst, volumes, num_channels);
|
|
+ if (g_strcmp0 (Inst->track_label, label) == 0)
|
|
+ {
|
|
+ xvd_calculate_avg_volume (Inst, volumes, num_channels);
|
|
#ifdef HAVE_LIBNOTIFY
|
|
- xvd_notify_volume_notification (Inst);
|
|
+ xvd_notify_volume_notification (Inst);
|
|
#endif
|
|
+ }
|
|
+
|
|
g_free (label);
|
|
}
|
|
- else if (type == GST_MIXER_MESSAGE_MIXER_CHANGED) {
|
|
+ else if (type == GST_MIXER_MESSAGE_MIXER_CHANGED)
|
|
+ {
|
|
// This kind of message shouldn't happen on an hardware card
|
|
g_debug ("GST_MIXER_MESSAGE_MIXER_CHANGED event\n");
|
|
}
|
|
--
|
|
2.3.0
|
|
|