[Kst] kdeextragear-2/kst/kst/datasources/cdf
George Staikos
staikos at kde.org
Thu Jul 29 03:45:57 CEST 2004
CVS commit by staikos:
fix the memory leak
M +2 -1 cdf.cpp 1.6
--- kdeextragear-2/kst/kst/datasources/cdf/cdf.cpp #1.5:1.6
@@ -104,5 +104,5 @@ int CdfSource::readField(double *v, cons
}
- void *binary = malloc(sizeof(long double));
+ void *binary = malloc(sizeof(long double)); // FIXME: put this on the stack
kdDebug() << "Starting to read " << n << " value(s)... from " << s << " to " << s+n << " and less than " << maxRec << endl;
@@ -141,4 +141,5 @@ int CdfSource::readField(double *v, cons
}
+ free(binary);
kdDebug() << "Finished reading " << field << endl;
status = CDFclose(id);
More information about the Kst
mailing list