diff options
author | Max Kellermann <max@duempel.org> | 2009-01-21 16:17:57 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-21 16:17:57 +0100 |
commit | 6fd8c28d2e8076a52f18ec4171efcddd48356761 (patch) | |
tree | f5483895b558edb10875b05bf7086911b667abe6 /src/playlist.c | |
parent | b14e48f930c89bf2f097cf270040316e2b7a4623 (diff) | |
download | mpd-6fd8c28d2e8076a52f18ec4171efcddd48356761.tar.gz mpd-6fd8c28d2e8076a52f18ec4171efcddd48356761.tar.xz mpd-6fd8c28d2e8076a52f18ec4171efcddd48356761.zip |
playlist: free memory with g_free()
Use g_free() consistently with g_malloc(). Don't clear the pointers
after freeing them.
Diffstat (limited to 'src/playlist.c')
-rw-r--r-- | src/playlist.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/playlist.c b/src/playlist.c index 063d06843..44344cf04 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -195,16 +195,11 @@ void finishPlaylist(void) playlist.length = 0; - free(playlist.songs); - playlist.songs = NULL; - free(playlist.songMod); - playlist.songMod = NULL; - free(playlist.order); - playlist.order = NULL; - free(playlist.idToPosition); - playlist.idToPosition = NULL; - free(playlist.positionToId); - playlist.positionToId = NULL; + g_free(playlist.songs); + g_free(playlist.songMod); + g_free(playlist.order); + g_free(playlist.idToPosition); + g_free(playlist.positionToId); g_rand_free(g_rand); g_rand = NULL; |