[asterisk-commits] bbryant: trunk r123692 - /trunk/main/tcptls.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 18 15:07:57 CDT 2008
Author: bbryant
Date: Wed Jun 18 15:07:56 2008
New Revision: 123692
URL: http://svn.digium.com/view/asterisk?view=rev&rev=123692
Log:
Fix a crash in tcp and tls connections related to reference counts.
Modified:
trunk/main/tcptls.c
Modified: trunk/main/tcptls.c
URL: http://svn.digium.com/view/asterisk/trunk/main/tcptls.c?view=diff&rev=123692&r1=123691&r2=123692
==============================================================================
--- trunk/main/tcptls.c (original)
+++ trunk/main/tcptls.c Wed Jun 18 15:07:56 2008
@@ -276,6 +276,7 @@
__ssl_setup(desc->tls_cfg, 1);
}
+ ao2_ref(ser, +1);
if (!ast_make_file_from_fd(ser))
goto error;
@@ -460,7 +461,7 @@
if (!ser->f) {
close(ser->fd);
ast_log(LOG_WARNING, "FILE * open failed!\n");
- ast_free(ser);
+ ao2_ref(ser, -1);
return NULL;
}
More information about the asterisk-commits
mailing list