X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=blobdiff_plain;f=benchmark%2Fchase-lev-deque-bugfix%2Fdeque.h;h=f188a8fd9657c18888a4fcd93ab04a18eead3cc7;hp=7d2df9f18e1732d7e2909cf5ec89faaa7b9afd0b;hb=60246219b510f28980a6f93f615458e41262a23f;hpb=9811b5edc5910159c1248ca2745f83ff5edc1e0d diff --git a/benchmark/chase-lev-deque-bugfix/deque.h b/benchmark/chase-lev-deque-bugfix/deque.h index 7d2df9f..f188a8f 100644 --- a/benchmark/chase-lev-deque-bugfix/deque.h +++ b/benchmark/chase-lev-deque-bugfix/deque.h @@ -36,8 +36,13 @@ typedef struct { spec_list *__deque; id_tag_t *tag; @InitVar: - __deque= new_spec_list(); + __deque = new_spec_list(); tag = new_id_tag(); // Beginning of available id + @Cleanup: + if (__deque) + free_spec_list(__deque); + if (tag) + free_id_tag(); @DefineFunc: tag_elem_t* new_tag_elem(call_id_t id, int data) { tag_elem_t *e = (tag_elem_t*) CMODEL_MALLOC(sizeof(tag_elem_t));