# HG changeset patch # User Jussi Judin # Date 1198564611 21600 # Node ID db3f9b548226f7577bbc0b792a4f7228e93b6af0 # Parent 75d1366e43a41037764617b2e0b16ba67a86a40b Fixes memory leak in vfs_fopen() in case path does not exist. (Bugzilla #39) diff -r 75d1366e43a4 -r db3f9b548226 src/audacious/vfs.c --- 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; }