isl_tab_add_sample: return int instead of isl_tab *
commitdbbfdfd295c3e02b2ce40392e6c7bf32eda45326
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 11 Apr 2014 14:46:03 +0000 (11 16:46 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 12 Apr 2014 12:11:52 +0000 (12 14:11 +0200)
tree0793f9970b34185fc86e35b1f840eeda6032b4c0
parent44d82375d7065cb6db3a5a47d6fe464a54a6c4f3
isl_tab_add_sample: return int instead of isl_tab *

In particular, return -1 on error rather than freeing the input isl_tab.

Since an isl_tab is not reference counted, there is no way for
extend_affine_hull to tell its callers that the isl_tab has already
been freed, possible resulting in double frees on errors
in isl_tab_add_sample.  Having isl_tab_add_sample return -1 instead
solves this problem.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_affine_hull.c
isl_tab.c
isl_tab.h
isl_tab_pip.c