[asterisk-commits] russell: branch russell/iax_refcount r80074 - /team/russell/iax_refcount/chan...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 20 11:47:45 CDT 2007


Author: russell
Date: Mon Aug 20 11:47:45 2007
New Revision: 80074

URL: http://svn.digium.com/view/asterisk?view=rev&rev=80074
Log:
Fix the potential of the use of a NULL pointer after a memory allocation error

Modified:
    team/russell/iax_refcount/channels/chan_iax2.c

Modified: team/russell/iax_refcount/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax_refcount/channels/chan_iax2.c?view=diff&rev=80074&r1=80073&r2=80074
==============================================================================
--- team/russell/iax_refcount/channels/chan_iax2.c (original)
+++ team/russell/iax_refcount/channels/chan_iax2.c Mon Aug 20 11:47:45 2007
@@ -9179,6 +9179,7 @@
 			memset(user, 0, sizeof(struct iax2_user));
 			if (ast_string_field_init(user, 32)) {
 				user = user_unref(user);
+				goto cleanup;
 			}
 			user->maxauthreq = maxauthreq;
 			user->curauthreq = oldcurauthreq;
@@ -9342,6 +9343,7 @@
 		}
 		ast_clear_flag(user, IAX_DELME);
 	}
+cleanup:
 	if (oldha)
 		ast_free_ha(oldha);
 	if (oldcon)




More information about the asterisk-commits mailing list