[xmp] Fix untimely g_free(filename) calls in Audacious 3 plugin.

Michael Schwendt mschwendt at fedoraproject.org
Fri Jun 15 12:36:14 UTC 2012


commit e7bf7eac3c12366659c7e359ff56a195b72cb163
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Fri Jun 15 14:36:14 2012 +0200

    Fix untimely g_free(filename) calls in Audacious 3 plugin.

 xmp-3.4.0-audacious-probe_for_tuple.patch |   18 +++++++++++++++++-
 xmp.spec                                  |    6 +++---
 2 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/xmp-3.4.0-audacious-probe_for_tuple.patch b/xmp-3.4.0-audacious-probe_for_tuple.patch
index e7552a2..1cc7b4b 100644
--- a/xmp-3.4.0-audacious-probe_for_tuple.patch
+++ b/xmp-3.4.0-audacious-probe_for_tuple.patch
@@ -1,6 +1,6 @@
 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
++++ xmp-3.4.0/src/plugin/audacious3.c	2012-06-15 14:27:32.896980189 +0200
 @@ -240,9 +240,9 @@
  	opt = xmp_get_options(ctx);
  	opt->skipsmp = 1;	/* don't load samples */
@@ -20,3 +20,19 @@ diff -Nurb --strip-trailing-cr xmp-3.4.0-orig/src/plugin/audacious3.c xmp-3.4.0/
  	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);
+@@ -340,7 +341,6 @@
+ 	_D("*** loading: %s", filename);
+ 
+ 	lret =  xmp_load_module(ctx, filename);
+-	g_free(filename);
+ 
+ 	if (lret < 0) {
+ 		xmp_close_audio(ctx);
+@@ -351,6 +351,7 @@
+ 	xmp_get_module_info(ctx, &xmp_cfg.mod_info);
+ 
+ 	tuple = tuple_new_from_filename(filename);
++	g_free(filename);
+ 	tuple_set_str(tuple, FIELD_TITLE, NULL, xmp_cfg.mod_info.name);
+ 	tuple_set_str(tuple, FIELD_CODEC, NULL, xmp_cfg.mod_info.type);
+ 	tuple_set_int(tuple, FIELD_LENGTH, NULL, lret);
diff --git a/xmp.spec b/xmp.spec
index f7aa6b5..3d1d364 100644
--- a/xmp.spec
+++ b/xmp.spec
@@ -8,7 +8,7 @@
 
 Name: xmp
 Version: 3.4.0
-Release: 8%{?dist}
+Release: 9%{?dist}
 Summary: A multi-format module player
 Group: Applications/Multimedia
 #Source: http://downloads.sourceforge.net/sourceforge/xmp/xmp-%{version}.tar.gz
@@ -114,8 +114,8 @@ 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.
+* Fri Jun 15 2012 Michael Schwendt <mschwendt at fedoraproject.org> - 3.4.0-9
+- Fix untimely g_free(filename) calls 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