search for: free_sect

Displaying 2 results from an estimated 2 matches for "free_sect".

Did you mean: free_fct
2014 Mar 20
5
[PATCH 1/3] builder/virt-index-validate: try to cleanup in any occasion
Always close the file (ignoring its result) after a parsing, and cleanup the parse_context object before any exit(). This eases the debugging of memory issues in the actual parser. --- builder/index-validate.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/builder/index-validate.c b/builder/index-validate.c index 4b7fe93..fed0f81 100644 ---
2014 Mar 19
7
[PATCH 1/3] builder: make the C index parser reentrant
...5b0e3..f32534c 100644 --- a/builder/index-struct.c +++ b/builder/index-struct.c @@ -20,19 +20,23 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "index-struct.h" -struct section *parsed_index = NULL; -int seen_comments = 0; - static void free_section (struct section *section); static void free_field (struct field *field); void -free_index (void) +parse_context_init (struct parse_context *context) +{ + memset (context, 0, sizeof *context); +} + +void +parse_context_free (struct parse_context *context) { - free_section (parsed_index); +...