isl_Polyhedron_Reduced_Basis: avoid double free of barvinok_options
commita488776044362891383dd2ba34f9d0392c1f53c0
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 4 May 2014 10:10:04 +0000 (4 12:10 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 4 May 2014 11:35:22 +0000 (4 13:35 +0200)
tree4f69e0c6645b1cfa2cf7531f63974b1711b2cae3
parent1192e00b23670c71a436f065c58f5524e80142b9
isl_Polyhedron_Reduced_Basis: avoid double free of barvinok_options

In 6702a6a (avoid use of isl_ctx internals, Wed Mar 16 16:25:11 2011 +0100),
isl_Polyhedron_Reduced_Basis was changed to update
options->isl->gbr_only_first and the to pass the barvinok_options
to isl_ctx_alloc_with_options.  This will make the resuling isl_ctx
own the barvinok_options, which are then also freed when the isl_ctx
is freed, even though it may and in fact is reused in the very
same function after ths isl_ctx is freed.  Apparently, this change
was never tested.

In f387b45 (update isl for hiding of isl_options,
Fri Nov 11 11:33:25 2011 +0100), the function was further changed
to update the gbr_only_first isl option after the isl_ctx is created.
There is therefore no longer any need to pass the barvinok_options
to isl_ctx_alloc_with_options and we can simply call isl_ctx_alloc instead.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
basis_reduction.c
testlib.cc