From 0829cdb98cb2f9fa4d48fe77a95027f770f14f6c Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Sun, 11 Feb 2018 19:06:31 +0000 Subject: [PATCH] Fix memory allocation error. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8494 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/wsprd/wsprd_exp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/wsprd/wsprd_exp.c b/lib/wsprd/wsprd_exp.c index 3751c4cb8..c27269796 100644 --- a/lib/wsprd/wsprd_exp.c +++ b/lib/wsprd/wsprd_exp.c @@ -540,12 +540,12 @@ void subtract_signal2(float *id, float *qd, long np, float *refi, *refq, *ci, *cq, *cfi, *cfq; - refi=calloc(nc2,sizeof(float)*nc2); - refq=calloc(nc2,sizeof(float)*nc2); - ci=calloc(nc2,sizeof(float)*nc2); - cq=calloc(nc2,sizeof(float)*nc2); - cfi=calloc(nc2,sizeof(float)*nc2); - cfq=calloc(nc2,sizeof(float)*nc2); + refi=calloc(nc2,sizeof(float)); + refq=calloc(nc2,sizeof(float)); + ci=calloc(nc2,sizeof(float)); + cq=calloc(nc2,sizeof(float)); + cfi=calloc(nc2,sizeof(float)); + cfq=calloc(nc2,sizeof(float)); twopidt=2.0*pi*dt; @@ -833,7 +833,7 @@ int main(int argc, char *argv[]) } if( stackdecoder ) { - stack=calloc(sizeof(struct snode),stacksize); + stack=calloc(stacksize,sizeof(struct snode)); } if( optind+1 > argc) {