changes
[cdsspec-compiler.git] / benchmark / ms-queue / my_queue.h
index 6618a52..ce87b1d 100644 (file)
@@ -54,6 +54,11 @@ void init_queue(queue_t *q, int num_threads);
                @InitVar:
                        __queue = new_spec_list();
                        tag = new_id_tag(); // Beginning of available id
+               @Cleanup:
+                       if (__queue)
+                               free_spec_list(__queue);
+                       if (tag)
+                               free_id_tag(tag);
                @DefineFunc:
                        tag_elem_t* new_tag_elem(call_id_t id, unsigned int data) {
                                tag_elem_t *e = (tag_elem_t*) CMODEL_MALLOC(sizeof(tag_elem_t));