#include <unistd.h>
#include <string.h>
#include <stdlib.h>
-#include <assert.h>
#include <inttypes.h>
+#include "common/bytecode/bytecode.h"
#include "filter-ast.h"
#include "filter-parser.h"
-#include "filter-bytecode.h"
#include "memstream.h"
#include <common/compat/errno.h>
{
int ret;
- free_strings(&parser_ctx->allocated_strings);
- filter_ast_free(parser_ctx->ast);
ret = yylex_destroy(parser_ctx->scanner);
if (ret)
fprintf(stderr, "yylex_destroy error\n");
+
+ filter_ast_free(parser_ctx->ast);
+ free_strings(&parser_ctx->allocated_strings);
+ filter_ir_free(parser_ctx);
+ free(parser_ctx->bytecode);
+ free(parser_ctx->bytecode_reloc);
+
free(parser_ctx);
}
struct filter_parser_ctx *ctx = NULL;
FILE *fmem = NULL;
- assert(filter_expression);
- assert(ctxp);
+ LTTNG_ASSERT(filter_expression);
+ LTTNG_ASSERT(ctxp);
/*
* Casting const to non-const, as the underlying function will use it in