Skip to content

Commit c2b3082

Browse files
committed
fix a memory leak
1 parent a112464 commit c2b3082

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/xmrwindow.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3657,12 +3657,17 @@ str_start_with(const char *str, const char *prefix)
36573657
static gboolean
36583658
is_track_downloaded(SongInfo *track)
36593659
{
3660+
gboolean retv = FALSE;
36603661
gchar *file = make_track_file(track);
36613662
if (!file) {
36623663
return FALSE;
36633664
}
36643665

3665-
return is_file_exists(file) && !str_start_with(track->location, "http://");
3666+
retv = is_file_exists(file) && !str_start_with(track->location, "http://");
3667+
3668+
g_free(file);
3669+
3670+
return retv;
36663671
}
36673672

36683673
static gboolean

0 commit comments

Comments
 (0)