[Asterisk-cvs] libpri q921.c,1.16,1.17
markster at lists.digium.com
markster at lists.digium.com
Fri Jul 23 12:18:02 CDT 2004
Update of /usr/cvsroot/libpri
In directory localhost.localdomain:/tmp/cvs-serv5780
Modified Files:
q921.c
Log Message:
Don't seg when out of memory (bug #2120)
Index: q921.c
===================================================================
RCS file: /usr/cvsroot/libpri/q921.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- q921.c 16 Jul 2004 02:14:04 -0000 1.16
+++ q921.c 23 Jul 2004 16:04:01 -0000 1.17
@@ -383,8 +383,8 @@
q921_frame *f, *prev=NULL;
for (f=pri->txqueue; f; f = f->next) prev = f;
f = malloc(sizeof(q921_frame) + len + 2);
- memset(f,0,sizeof(q921_frame) + len + 2);
if (f) {
+ memset(f,0,sizeof(q921_frame) + len + 2);
Q921_INIT(pri, f->h);
switch(pri->localtype) {
case PRI_NETWORK:
More information about the svn-commits
mailing list