Don't crash in __pri_new_tei() if a GR303 subchannel creation fails.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1955 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
ab32336b09
commit
34370a5984
4
pri.c
4
pri.c
@ -372,7 +372,7 @@ struct pri *__pri_new_tei(int fd, int node, int switchtype, struct pri *master,
|
||||
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 @@ struct pri *__pri_new_tei(int fd, int node, int switchtype, struct pri *master,
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user