Mercurial > audlegacy
changeset 4107:db3f9b548226
Fixes memory leak in vfs_fopen() in case path does not exist. (Bugzilla #39)
author | Jussi Judin <jjudin+audacious@iki.fi> |
---|---|
date | Tue, 25 Dec 2007 00:36:51 -0600 |
parents | 75d1366e43a4 |
children | dfe5d686749e |
files | src/audacious/vfs.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/vfs.c Mon Dec 24 23:05:33 2007 -0600 +++ b/src/audacious/vfs.c Tue Dec 25 00:36:51 2007 -0600 @@ -89,10 +89,12 @@ if (vtable == NULL) { g_warning("could not open '%s', no transport plugin available", decpath); + g_free(decpath); return NULL; } file = vtable->vfs_fopen_impl(decpath, mode); + g_free(decpath); if (file == NULL) return NULL; @@ -101,8 +103,6 @@ file->base = vtable; file->ref = 1; - g_free(decpath); - return file; }