mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-29 23:39:35 +00:00 
			
		
		
		
	tests/test_http_media_cache: Fix file descriptor leak in test.
Change-Id: Ie8a9ae3d13bdeaacafc8d28271adc6707f633a5f
This commit is contained in:
		| @@ -173,12 +173,10 @@ static int http_callback(struct ast_tcptls_session_instance *ser, const struct a | ||||
| 		ast_http_send(ser, method, options.status_code, options.status_text, http_header, NULL, send_file ? fd : 0, 1); | ||||
| 	} else { | ||||
| 		ast_http_send(ser, method, 304, "Not Modified", http_header, NULL, 0, 1); | ||||
| 		if (send_file) { | ||||
| 			close(fd); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if (send_file) { | ||||
| 		close(fd); | ||||
| 		unlink(file_name); | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user