Merge pull request #182 from berak/fix_mnist

fix missing delete[] calls in or_mnist.cpp
pull/141/merge
Vadim Pisarevsky 10 years ago
commit f861dc9efc
  1. 3
      modules/datasets/src/or_mnist.cpp

@ -84,6 +84,7 @@ void OR_mnistImp::loadDatasetPart(const string &imagesFile, const string &labels
fclose(f);
if (num*imageSize != res)
{
delete[] images;
return;
}
f = fopen(labelsFile.c_str(), "rb");
@ -93,6 +94,8 @@ void OR_mnistImp::loadDatasetPart(const string &imagesFile, const string &labels
fclose(f);
if (num != res)
{
delete[] images;
delete[] labels;
return;
}

Loading…
Cancel
Save