Explorar o código

Clear model initialization if we could not load the model

Samuel Thibault %!s(int64=5) %!d(string=hai) anos
pai
achega
a481131814
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;
 }