mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	documentportal: Fix small leak in add_documents with empty URI list
When called with an empty URI list (or only inaccessible files),
g_document_portal_add_documents would not call g_variant_builder_end,
leaking the memory allocated by the variant builder.
Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/2733
(cherry-picked from commit 27203e48c9)
			
			
This commit is contained in:
		
				
					committed by
					
						
						Marco Trevisan (Treviño)
					
				
			
			
				
	
			
			
			
						parent
						
							e77f036cb6
						
					
				
				
					commit
					aafa45e583
				
			@@ -201,6 +201,7 @@ g_document_portal_add_documents (GList       *uris,
 | 
			
		||||
  else
 | 
			
		||||
    {
 | 
			
		||||
      ruris = g_list_copy_deep (uris, (GCopyFunc)g_strdup, NULL);
 | 
			
		||||
      g_variant_builder_clear (&builder);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
out:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user