[libpri-commits] rmudgett: branch 1.4 r1955 - /branches/1.4/pri.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Sep 2 12:33:55 CDT 2010


Author: rmudgett
Date: Thu Sep  2 12:33:51 2010
New Revision: 1955

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1955
Log:
Don't crash in __pri_new_tei() if a GR303 subchannel creation fails.

Modified:
    branches/1.4/pri.c

Modified: branches/1.4/pri.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/pri.c?view=diff&rev=1955&r1=1954&r2=1955
==============================================================================
--- branches/1.4/pri.c (original)
+++ branches/1.4/pri.c Thu Sep  2 12:33:51 2010
@@ -372,7 +372,7 @@
 		p->subchannel = __pri_new_tei(-1, node, PRI_SWITCH_GR303_EOC_PATH, p, NULL, NULL, NULL, Q921_TEI_GR303_EOC_PATH, 0);
 		if (!p->subchannel) {
 			free(p);
-			p = NULL;
+			return NULL;
 		}
 		break;
 	case PRI_SWITCH_GR303_TMC:
@@ -382,7 +382,7 @@
 		p->subchannel = __pri_new_tei(-1, node, PRI_SWITCH_GR303_TMC_SWITCHING, p, NULL, NULL, NULL, Q921_TEI_GR303_TMC_SWITCHING, 0);
 		if (!p->subchannel) {
 			free(p);
-			p = NULL;
+			return NULL;
 		}
 		break;
 	case PRI_SWITCH_GR303_TMC_SWITCHING:




More information about the libpri-commits mailing list