search for: free_field

Displaying 6 results from an estimated 6 matches for "free_field".

Did you mean: file_field
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 Jan 21
0
[PATCH] builder: proper consider subkeys in index files
...ff here. */ yylval.field->value = strndup (yytext+i+1, yyleng-(i+2)); return FIELD; diff --git a/builder/index-struct.c b/builder/index-struct.c index 26bed24..fe5b0e3 100644 --- a/builder/index-struct.c +++ b/builder/index-struct.c @@ -52,6 +52,7 @@ free_field (struct field *field) if (field) { free_field (field->next); free (field->key); + free (field->subkey); free (field->value); free (field); } diff --git a/builder/index-struct.h b/builder/index-struct.h index ac8a3dd..f92e01d 100644 --- a/builder/index-struct...
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
On Tuesday 21 January 2014 16:37:20 Richard W.M. Jones wrote: > On Tue, Jan 21, 2014 at 05:18:27PM +0100, Pino Toscano wrote: > > + sv = caml_copy_string (fields->subkey ? fields->subkey : ""); > > > > Store_field (v, 1, sv); > > Heh, sure would be nice if this was an option type :-) > > I believe the following should work: > >
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
...ff here. */ yylval.field->value = strndup (yytext+i+1, yyleng-(i+2)); return FIELD; diff --git a/builder/index-struct.c b/builder/index-struct.c index 26bed24..fe5b0e3 100644 --- a/builder/index-struct.c +++ b/builder/index-struct.c @@ -52,6 +52,7 @@ free_field (struct field *field) if (field) { free_field (field->next); free (field->key); + free (field->subkey); free (field->value); free (field); } diff --git a/builder/index-struct.h b/builder/index-struct.h index ac8a3dd..f92e01d 100644 --- a/builder/index-struct...
2014 Sep 14
1
Patch to stop writing empty vorbiscomment fields
...243,7 @@ FLAC__bool flac__vorbiscomment_add(FLAC__StreamMetadata *block, const char *comm return false; } - if(!set_vc_field(block, &parsed, &dummy, raw, violation)) { + if(parsed.field_value_length > 0 && !set_vc_field(block, &parsed, &dummy, raw, violation)) { free_field(&parsed); return false; }
2014 Mar 19
7
[PATCH 1/3] builder: make the C index parser reentrant
...+ 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); + free_section (context->parsed_index); } stati...