aboutsummaryrefslogtreecommitdiffstats
path: root/main/audacious/audacious-2.4.3-id3v1-memleak-AUD-286.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/audacious/audacious-2.4.3-id3v1-memleak-AUD-286.patch')
-rw-r--r--main/audacious/audacious-2.4.3-id3v1-memleak-AUD-286.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/audacious/audacious-2.4.3-id3v1-memleak-AUD-286.patch b/main/audacious/audacious-2.4.3-id3v1-memleak-AUD-286.patch
new file mode 100644
index 0000000000..7dd3cdf63b
--- /dev/null
+++ b/main/audacious/audacious-2.4.3-id3v1-memleak-AUD-286.patch
@@ -0,0 +1,29 @@
+diff -Nur audacious-2.4.3-orig/src/libaudtag/id3/id3v1.c audacious-2.4.3/src/libaudtag/id3/id3v1.c
+--- audacious-2.4.3-orig/src/libaudtag/id3/id3v1.c 2011-01-12 12:07:37.000000000 +0100
++++ audacious-2.4.3/src/libaudtag/id3/id3v1.c 2011-01-28 23:31:15.356395589 +0100
+@@ -96,8 +96,7 @@
+ gchar *tmp_artist = g_strconcat(artist, convert_to_utf8(read_char_data(f, 60)), NULL);
+ gchar *tmp_album = g_strconcat(album, convert_to_utf8(read_char_data(f, 60)), NULL);
+ vfs_fseek(f, -170, SEEK_END);
+- gchar *tmp_genre = g_new0(gchar, 30);
+- tmp_genre = convert_to_utf8(read_char_data(f, 30));
++ gchar *tmp_genre = convert_to_utf8(read_char_data(f, 30));
+ g_free(title);
+ g_free(artist);
+ g_free(album);
+@@ -105,13 +104,12 @@
+ artist = tmp_artist;
+ album = tmp_album;
+
+- if (g_strcmp0(tmp_genre, NULL) == 1)
++ if (tmp_genre != NULL)
+ {
+ tuple_associate_string(tuple, FIELD_GENRE, NULL, tmp_genre);
+ genre_set = TRUE;
++ g_free(tmp_genre);
+ }
+-
+- g_free(tmp_genre);
+ }
+
+ tuple_associate_string(tuple, FIELD_TITLE, NULL, title);