Commit 1788c5df authored by John Douglas Veitch's avatar John Douglas Veitch
Browse files

Fix bug with uninitialised status pointer in lalnest.c

Original: bf6fb7598b7ba41711cefff60d1168d252730dd5
parent 70f3f06f
......@@ -228,15 +228,16 @@ REAL8TimeSeries *readTseries(CHAR *cachefile, CHAR *channel, LIGOTimeGPS start,
FrCache *cache = NULL;
FrStream *stream = NULL;
REAL8TimeSeries *out = NULL;
fprintf(stdout,"Attempting to open %s at time %lf\n",cachefile,start.gpsSeconds+1e-9*start.gpsNanoSeconds);
memset(&status,0,sizeof(LALStatus));
fprintf(stdout,"Attempting to open %s at time %lf\n",cachefile,start.gpsSeconds+1e-9*start.gpsNanoSeconds);
cache = XLALFrImportCache( cachefile );
if(cache==NULL) {fprintf(stderr,"ERROR: Unable to import cache file %s\n",cachefile); exit(-1);}
stream = XLALFrCacheOpen( cache );
if(stream==NULL) {fprintf(stderr,"ERROR: Unable to open stream from frame cache file\n"); exit(-1);}
out = XLALFrInputREAL8TimeSeries( stream, channel, &start, length , 0 );
if(out==NULL) fprintf(stderr,"ERROR: unable to read channel %s from %s at time %i\nCheck the specified data duration is not too long\n",channel,cachefile,start.gpsSeconds);
LALDestroyFrCache(&status,&cache);
LALFrClose(&status,&stream);
LAL_CALL(LALDestroyFrCache(&status,&cache),&status);
LAL_CALL(LALFrClose(&status,&stream),&status);
return out;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment