diff --git a/q921.c b/q921.c index 4c046ac..1a64b3d 100755 --- a/q921.c +++ b/q921.c @@ -383,8 +383,8 @@ int q921_transmit_iframe(struct pri *pri, void *buf, int len, int cr) 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: