mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Fix leaks
This commit is contained in:
		| @@ -89,6 +89,7 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block, | ||||
|     if (!rx_signal_file) | ||||
|         { | ||||
|             std::cerr << "Unable to open file!" << std::endl; | ||||
|             free(buffer_float); | ||||
|             return; | ||||
|         } | ||||
|  | ||||
| @@ -123,6 +124,9 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block, | ||||
|     if (!buffer_DMA) | ||||
|         { | ||||
|             std::cerr << "Memory error!" << std::endl; | ||||
|             free(buffer_float); | ||||
|             fclose(rx_signal_file); | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|     // open the DMA descriptor | ||||
| @@ -130,6 +134,9 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block, | ||||
|     if (dma_descr < 0) | ||||
|         { | ||||
|             std::cerr << "Can't open loop device\n"; | ||||
|             free(buffer_float); | ||||
|             free(buffer_DMA); | ||||
|             fclose(rx_signal_file); | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -87,6 +87,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file, | ||||
|     if (!buffer_DMA) | ||||
|         { | ||||
|             std::cerr << "Memory error!" << std::endl; | ||||
|             close(dma_descr); | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez