Skip to content
Snippets Groups Projects
Commit 8d353eb1 authored by Brett Bryant's avatar Brett Bryant
Browse files

Fix a crash in tcp and tls connections related to reference counts.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent eaa14309
Branches
Tags
No related merge requests found
......@@ -276,6 +276,7 @@ struct ast_tcptls_session_instance *ast_tcptls_client_start(struct server_args *
__ssl_setup(desc->tls_cfg, 1);
}
ao2_ref(ser, +1);
if (!ast_make_file_from_fd(ser))
goto error;
......@@ -460,7 +461,7 @@ void *ast_make_file_from_fd(void *data)
if (!ser->f) {
close(ser->fd);
ast_log(LOG_WARNING, "FILE * open failed!\n");
ast_free(ser);
ao2_ref(ser, -1);
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment