changes
[cdsspec-compiler.git] / benchmark / chase-lev-deque-bugfix / deque.h
index 7d2df9f..f188a8f 100644 (file)
@@ -36,8 +36,13 @@ typedef struct {
         spec_list *__deque;
         id_tag_t *tag;
         @InitVar:
         spec_list *__deque;
         id_tag_t *tag;
         @InitVar:
-            __deque= new_spec_list();
+            __deque = new_spec_list();
             tag = new_id_tag(); // Beginning of available id
             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));
         @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));