remove location from dtd_build_data_t avoiding to (double) free it.

svn path=/trunk/; revision=16147
This commit is contained in:
Luis Ontanon 2005-10-06 22:01:52 +00:00
parent 5ddbeb2cb8
commit f1b498587b
4 changed files with 3 additions and 7 deletions

View File

@ -650,9 +650,8 @@ static void destroy_dtd_data(dtd_build_data_t* dtd_data) {
if(dtd_data->media_type) g_free(dtd_data->media_type);
if(dtd_data->description) g_free(dtd_data->description);
if(dtd_data->proto_root) g_free(dtd_data->proto_root);
if(dtd_data->location) g_free(dtd_data->location);
g_string_free(dtd_data->error,TRUE);
g_string_free(dtd_data->error,TRUE);
while(dtd_data->elements->len) {

View File

@ -42,7 +42,6 @@ typedef struct _dtd_build_data_t {
GPtrArray* elements;
GPtrArray* attributes;
gchar* location;
GString* error;
} dtd_build_data_t;

View File

@ -74,7 +74,7 @@ static GPtrArray* g_ptr_array_join(GPtrArray* a, GPtrArray* b){
}
%parse_failure {
g_string_sprintfa(bd->error,"DTD parsing failure at %s\n",bd->location);
g_string_sprintfa(bd->error,"DTD parsing failure\n");
}
%token_prefix TOKEN_

View File

@ -82,7 +82,6 @@
#define DTD_PARSE(token_type) \
{ DEBUG_DTD_TOKEN; \
build_data->location = location; \
DtdParse(pParser, (token_type), new_token(yytext), build_data); \
if(build_data->error->len > 0) yyterminate(); \
}
@ -326,7 +325,6 @@ extern dtd_build_data_t* dtd_parse(GString* s) {
build_data->elements = g_ptr_array_new();
build_data->attributes = g_ptr_array_new();
build_data->location = NULL;
build_data->error = g_string_new("");
location = NULL;