Skip to content
Snippets Groups Projects
Commit c0b802c5 authored by zuul's avatar zuul Committed by Gerrit Code Review
Browse files

Merge "tests/test_http_media_cache: Fix file descriptor leak in test."

parents 4cf7458c a72f3b5b
No related branches found
No related tags found
No related merge requests found
...@@ -173,12 +173,10 @@ static int http_callback(struct ast_tcptls_session_instance *ser, const struct a ...@@ -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); ast_http_send(ser, method, options.status_code, options.status_text, http_header, NULL, send_file ? fd : 0, 1);
} else { } else {
ast_http_send(ser, method, 304, "Not Modified", http_header, NULL, 0, 1); ast_http_send(ser, method, 304, "Not Modified", http_header, NULL, 0, 1);
if (send_file) {
close(fd);
}
} }
if (send_file) { if (send_file) {
close(fd);
unlink(file_name); unlink(file_name);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment