tests: fix test-iov leaks
Spotted thanks to ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
		
							parent
							
								
									4ae3c0e27f
								
							
						
					
					
						commit
						d55f295b2b
					
				@ -208,6 +208,9 @@ static void test_io(void)
 | 
				
			|||||||
               } while(k < j);
 | 
					               } while(k < j);
 | 
				
			||||||
           }
 | 
					           }
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
 | 
					       iov_free(iov, niov);
 | 
				
			||||||
 | 
					       g_free(buf);
 | 
				
			||||||
 | 
					       g_free(siov);
 | 
				
			||||||
       exit(0);
 | 
					       exit(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
@ -246,6 +249,10 @@ static void test_io(void)
 | 
				
			|||||||
               test_iov_bytes(iov, niov, i, j - i);
 | 
					               test_iov_bytes(iov, niov, i, j - i);
 | 
				
			||||||
           }
 | 
					           }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					       iov_free(iov, niov);
 | 
				
			||||||
 | 
					       g_free(buf);
 | 
				
			||||||
 | 
					       g_free(siov);
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user