Commit ec6b114f authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[fix] missing destroy/free in tutorials

Detected by valgrind.
parent df690221
......@@ -158,7 +158,7 @@ main(void)
aml_layout_destroy(&a_layout);
aml_layout_destroy(&b_layout);
aml_layout_destroy(&a_continuous_layout);
aml_layout_destroy(&a_continuous_layout);
aml_layout_destroy(&b_continuous_layout);
aml_dma_linux_par_destroy(&dma);
return 0;
......
......@@ -126,6 +126,7 @@ int main(int argc, char **argv)
aml_layout_destroy(&lay_part);
aml_layout_destroy(&layout_elements);
aml_layout_destroy(&new_layout);
aml_layout_destroy(&layout_energy);
aml_area_munmap(area, particles, sizeof(struct particle) * size);
free(array_coords);
......
......@@ -100,7 +100,10 @@ int dgemm_tiled(struct aml_tiling *tiling_a, struct aml_tiling *tiling_b,
(size_t[]){l, j});
dgemm_layout(mt, nt, kt, ltile_a, ltile_b,
ltile_c);
aml_layout_destroy(&ltile_a);
aml_layout_destroy(&ltile_b);
}
aml_layout_destroy(&ltile_c);
}
}
return AML_SUCCESS;
......@@ -183,6 +186,7 @@ int main(int argc, char **argv)
free(a);
free(b);
free(c);
free(c_ref);
aml_finalize();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment