]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Clean up properly if we failed to parse a data or method info file.
authorMichal Malý <madcatxster@devoid-pointer.net>
Sun, 29 Mar 2015 13:58:24 +0000 (15:58 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sun, 29 Mar 2015 13:58:24 +0000 (15:58 +0200)
datafilesloader.cpp

index 54505bb8b95c635090d266be8bc38c4aea9d95d7..4f5d2f057598ee82dc943bd9d94d47290b728328 100644 (file)
@@ -62,6 +62,7 @@ bool DataFilesLoader::loadMeasuredData(const QDir path, std::vector<HPCS_Measure
     ret = hpcs_read_mdata(absPath.toLocal8Bit(), mdata);
     if (ret != HPCS_OK) {
       logFailedFile(s, hpcs_error_to_string(ret), failedFiles);
+      hpcs_free_mdata(mdata);
       continue;
     }
 
@@ -87,6 +88,7 @@ bool DataFilesLoader::loadMethodInfo(const QDir path, std::vector<std::pair<cons
     ret = hpcs_read_minfo(absPath.toUtf8(), minfo);
     if (ret != HPCS_OK) {
       logFailedFile(s, hpcs_error_to_string(ret), failedFiles);
+      hpcs_free_minfo(minfo);
       continue;
     }