[xmp] Fix untimely g_free(filename) in Audacious 3 plugin.
Michael Schwendt
mschwendt at fedoraproject.org
Fri Jun 15 12:04:40 UTC 2012
commit 6547137eb38772191049fb0c843ef6c649ebaccc
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date: Fri Jun 15 14:04:37 2012 +0200
Fix untimely g_free(filename) in Audacious 3 plugin.
xmp-3.4.0-audacious-probe_for_tuple.patch | 22 ++++++++++++++++++++++
xmp.spec | 8 +++++++-
2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/xmp-3.4.0-audacious-probe_for_tuple.patch b/xmp-3.4.0-audacious-probe_for_tuple.patch
new file mode 100644
index 0000000..e7552a2
--- /dev/null
+++ b/xmp-3.4.0-audacious-probe_for_tuple.patch
@@ -0,0 +1,22 @@
+diff -Nurb --strip-trailing-cr xmp-3.4.0-orig/src/plugin/audacious3.c xmp-3.4.0/src/plugin/audacious3.c
+--- xmp-3.4.0-orig/src/plugin/audacious3.c 2012-06-15 13:51:40.650150003 +0200
++++ xmp-3.4.0/src/plugin/audacious3.c 2012-06-15 13:50:34.135813823 +0200
+@@ -240,9 +240,9 @@
+ opt = xmp_get_options(ctx);
+ opt->skipsmp = 1; /* don't load samples */
+ len = xmp_load_module(ctx, filename);
+- g_free(filename);
+
+ if (len < 0) {
++ g_free(filename);
+ xmp_free_context(ctx);
+ return NULL;
+ }
+@@ -250,6 +250,7 @@
+ xmp_get_module_info(ctx, &mi);
+
+ tuple = tuple_new_from_filename(filename);
++ g_free(filename);
+ tuple_set_str(tuple, FIELD_TITLE, NULL, mi.name);
+ tuple_set_str(tuple, FIELD_CODEC, NULL, mi.type);
+ tuple_set_int(tuple, FIELD_LENGTH, NULL, len);
diff --git a/xmp.spec b/xmp.spec
index c91a20e..f7aa6b5 100644
--- a/xmp.spec
+++ b/xmp.spec
@@ -8,7 +8,7 @@
Name: xmp
Version: 3.4.0
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: A multi-format module player
Group: Applications/Multimedia
#Source: http://downloads.sourceforge.net/sourceforge/xmp/xmp-%{version}.tar.gz
@@ -28,6 +28,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
# any GUI elements with config section/name pairs directly
Patch0: xmp-3.4.0-audacious-3.1.patch
Patch1: xmp-3.4.0-audacious-3.2.patch
+# fix untimely g_free / will be reported to xmp devel list
+Patch2: xmp-3.4.0-audacious-probe_for_tuple.patch
%description
The Extended Module Player is a modplayer for Unix-like systems that plays
@@ -75,6 +77,7 @@ This package contains the xmp plugin for XMMS.
%setup -q
%patch0 -p1 -b .aud-api-3.1
%patch1 -p1 -b .aud-api-3.2
+%patch2 -p1 -b .aud-probe_for_tuple
pushd docs
for file in ChangeLog CREDITS ; do
iconv -f iso8859-1 -t utf8 -o $file.utf $file && touch -r $file $file.utf && mv $file.utf $file
@@ -111,6 +114,9 @@ rm -rf %{buildroot}
%{xmms_input_plugin_dir}/*
%changelog
+* Fri Jun 15 2012 Michael Schwendt <mschwendt at fedoraproject.org> - 3.4.0-8
+- Fix untimely g_free(filename) in Audacious 3 plugin.
+
* Mon Jun 4 2012 Michael Schwendt <mschwendt at fedoraproject.org> - 3.4.0-7
- Fix undefined symbol corner-case for Audacious 3.2 API (#825937).
More information about the scm-commits
mailing list