projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e71ad6
)
isl_pw_*_on_shared_domain_in: avoid double free on error path
author
Sven Verdoolaege
<skimo@kotnet.org>
Sun, 2 Dec 2012 14:35:49 +0000
(15:35 +0100)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Sun, 2 Dec 2012 14:35:49 +0000
(15:35 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_pw_templ.c
patch
|
blob
|
history
diff --git
a/isl_pw_templ.c
b/isl_pw_templ.c
index
394571d
..
f112fc0
100644
(file)
--- a/
isl_pw_templ.c
+++ b/
isl_pw_templ.c
@@
-538,9
+538,9
@@
static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1,
n = pw1->n * pw2->n;
#ifdef HAS_TYPE
- res = FN(PW,alloc_size)(
space
, pw1->type, n);
+ res = FN(PW,alloc_size)(
isl_space_copy(space)
, pw1->type, n);
#else
- res = FN(PW,alloc_size)(
space
, n);
+ res = FN(PW,alloc_size)(
isl_space_copy(space)
, n);
#endif
for (i = 0; i < pw1->n; ++i) {
@@
-568,6
+568,7
@@
static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1,
}
}
+ isl_space_free(space);
FN(PW,free)(pw1);
FN(PW,free)(pw2);
return res;