libqos: remove some leaks
qpci_device_find() returns allocated data, don't leak it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
		
							parent
							
								
									1760048a5d
								
							
						
					
					
						commit
						ea53854a54
					
				| @ -34,11 +34,13 @@ void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id, | ||||
| 
 | ||||
|             if (vendor_id != -1 && | ||||
|                 qpci_config_readw(dev, PCI_VENDOR_ID) != vendor_id) { | ||||
|                 g_free(dev); | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
|             if (device_id != -1 && | ||||
|                 qpci_config_readw(dev, PCI_DEVICE_ID) != device_id) { | ||||
|                 g_free(dev); | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Marc-André Lureau
						Marc-André Lureau