Fix memory leak in get_pixbuf_from_path
If the svg-file is not found, the string containing the svg ending is never freed again.
This commit is contained in:
		
							parent
							
								
									eb0a0f8602
								
							
						
					
					
						commit
						a833b4a0f4
					
				| @ -341,6 +341,7 @@ static GdkPixbuf *get_pixbuf_from_path(char *icon_path) | ||||
|                                 /* try svg */ | ||||
|                                 maybe_icon_path = g_strconcat(current_folder, "/", icon_path, ".svg", NULL); | ||||
|                                 if (!does_file_exist(maybe_icon_path)) { | ||||
|                                         g_free(maybe_icon_path); | ||||
|                                         /* fallback to png */ | ||||
|                                         maybe_icon_path = g_strconcat(current_folder, "/", icon_path, ".png", NULL); | ||||
|                                 } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Benedikt Heine
						Benedikt Heine