소스 검색

Clear model initialization if we could not load the model

Samuel Thibault 5 년 전
부모
커밋
a481131814
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/core/perfmodel/perfmodel_history.c

+ 2 - 0
src/core/perfmodel/perfmodel_history.c

@@ -1493,6 +1493,8 @@ int starpu_perfmodel_load_file(const char *filename, struct starpu_perfmodel *mo
 	res = fclose(f);
 	STARPU_ASSERT(res == 0);
 
+	if (ret)
+		starpu_perfmodel_unload_model(model);
 	return ret;
 }