summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 36e3f45)
raw | patch | inline | side by side (parent: 36e3f45)
author | Max Kellermann <max.kellermann@gmail.com> | |
Tue, 28 Mar 2017 20:29:50 +0000 (22:29 +0200) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Tue, 28 Mar 2017 20:30:04 +0000 (22:30 +0200) |
NEWS | patch | blob | history | |
src/screen_song.c | patch | blob | history |
index e913f5ae3d3ccc683a25b009c7b5b08e80a0cfdf..59ca615ad196f29041090b88a2ee91614687a461 100644 (file)
--- a/NEWS
+++ b/NEWS
ncmpc 0.28 - not yet released
* fix crash on lyrics screen
+* fix memory leak
ncmpc 0.27 - (2017-03-25)
* work around connect failure if /var/run/mpd/socket does not exist
diff --git a/src/screen_song.c b/src/screen_song.c
index 61c77d517fc0f5e3bf09fbd81fbbde5b98e0662d..d7b6d2c51d5b4feb7e52be03d6d39f67bb838064 100644 (file)
--- a/src/screen_song.c
+++ b/src/screen_song.c
char *p = g_strdup(value_iter);
unsigned width = utf8_cut_width(p, value_col);
- if (width == 0)
+ if (width == 0) {
/* not enough room for anything - bail out */
+ g_free(entry);
+ g_free(p);
break;
+ }
*entry_iter = 0;