playlist: free memory with g_free()
Use g_free() consistently with g_malloc(). Don't clear the pointers after freeing them.
This commit is contained in:
		@@ -195,16 +195,11 @@ void finishPlaylist(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	playlist.length = 0;
 | 
						playlist.length = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	free(playlist.songs);
 | 
						g_free(playlist.songs);
 | 
				
			||||||
	playlist.songs = NULL;
 | 
						g_free(playlist.songMod);
 | 
				
			||||||
	free(playlist.songMod);
 | 
						g_free(playlist.order);
 | 
				
			||||||
	playlist.songMod = NULL;
 | 
						g_free(playlist.idToPosition);
 | 
				
			||||||
	free(playlist.order);
 | 
						g_free(playlist.positionToId);
 | 
				
			||||||
	playlist.order = NULL;
 | 
					 | 
				
			||||||
	free(playlist.idToPosition);
 | 
					 | 
				
			||||||
	playlist.idToPosition = NULL;
 | 
					 | 
				
			||||||
	free(playlist.positionToId);
 | 
					 | 
				
			||||||
	playlist.positionToId = NULL;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	g_rand_free(g_rand);
 | 
						g_rand_free(g_rand);
 | 
				
			||||||
	g_rand = NULL;
 | 
						g_rand = NULL;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user