aboutsummaryrefslogtreecommitdiffstats
path: root/tdd.c
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 06:28:19 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 06:28:19 +0000
commit541c114058dbf1ce92562c69dfd88044b451c980 (patch)
tree3951d054807efa1962a3b47678d1800a77404418 /tdd.c
parenta3d59ebeb28aba9d4a9bf6ba518008fecded969f (diff)
Make sure malloc worked before accessing the mem in tdd.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4055 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'tdd.c')
-rwxr-xr-xtdd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tdd.c b/tdd.c
index 6ff6c0fbd..e2a6cc839 100755
--- a/tdd.c
+++ b/tdd.c
@@ -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 */