diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-18 20:07:56 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-18 20:07:56 +0000 |
commit | 83c055874a8c39d8d806560a845e36707aea0340 (patch) | |
tree | b4632cf0542d6d5eec8d966566de0b4fac8a79d7 /main/tcptls.c | |
parent | 6210051816f6994b69e6dcacd8b2c1a6bd5542b9 (diff) |
Fix a crash in tcp and tls connections related to reference counts.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123692 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/tcptls.c')
-rw-r--r-- | main/tcptls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/tcptls.c b/main/tcptls.c index 9ce3ac9b8..f51a44701 100644 --- a/main/tcptls.c +++ b/main/tcptls.c @@ -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; } |