Skip to content
Snippets Groups Projects
Commit 584418a2 authored by James Golovich's avatar James Golovich
Browse files

Make sure malloc worked before accessing the mem in tdd.c

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 10dfeecf
No related merge requests found
......@@ -77,8 +77,8 @@ struct tdd_state *tdd_new(void)
{
struct tdd_state *tdd;
tdd = malloc(sizeof(struct tdd_state));
memset(tdd, 0, sizeof(struct tdd_state));
if (tdd) {
memset(tdd, 0, sizeof(struct tdd_state));
tdd->fskd.spb = 176; /* 45.5 baud */
tdd->fskd.hdlc = 0; /* Async */
tdd->fskd.nbit = 5; /* 5 bits */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment