mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 14:28:24 +00:00
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
This commit is contained in:
@@ -276,6 +276,7 @@ struct ast_tcptls_session_instance *ast_tcptls_client_start(struct server_args *
|
|||||||
__ssl_setup(desc->tls_cfg, 1);
|
__ssl_setup(desc->tls_cfg, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ao2_ref(ser, +1);
|
||||||
if (!ast_make_file_from_fd(ser))
|
if (!ast_make_file_from_fd(ser))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@@ -460,7 +461,7 @@ void *ast_make_file_from_fd(void *data)
|
|||||||
if (!ser->f) {
|
if (!ser->f) {
|
||||||
close(ser->fd);
|
close(ser->fd);
|
||||||
ast_log(LOG_WARNING, "FILE * open failed!\n");
|
ast_log(LOG_WARNING, "FILE * open failed!\n");
|
||||||
ast_free(ser);
|
ao2_ref(ser, -1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user