;
if (p == end)
return end;
- l = p - start;
+ l = (int)(p - start);
p++;
- *value = malloc (l + 1);
+ *value = g_malloc (l + 1);
if (*value == NULL)
return end;
strncpy (*value, start, l);
if (p == end)
return end;
- l = p - start;
- *value = malloc (l + 1);
+ l = (int)(p - start);
+ *value = g_malloc (l + 1);
if (*value == NULL)
return end;
strncpy (*value, start, l);
p = skip_space (p, end);
if (p == end){
- free (name);
+ g_free (name);
return p;
}
if (*p != '='){
set_error ("Expected an = after the attribute name `%s'", name);
- free (name);
+ g_free (name);
return end;
}
p++;
p = skip_space (p, end);
if (p == end){
- free (name);
+ g_free (name);
return end;
}
p = parse_value (p, end, &value, error);
if (p == end){
- free (name);
+ g_free (name);
return p;
}
set_error ("%s", "Unfinished sequence");
goto fail;
}
- l = element_end - element_start;
- ename = malloc (l + 1);
+ l = (int)(element_end - element_start);
+ ename = g_malloc (l + 1);
if (ename == NULL)
goto fail;
strncpy (ename, element_start, l);
}
if (error != NULL && *error != NULL){
- free (ename);
+ g_free (ename);
goto fail;
}
goto fail;
}
}
- free (ename);
+ g_free (ename);
} else {
context->level = g_slist_prepend (context->level, ename);
}
if (context->parser.end_element != NULL){
context->parser.end_element (context, text, context->user_data, error);
if (error != NULL && *error != NULL){
- free (text);
+ g_free (text);
goto fail;
}
}
- free (text);
+ g_free (text);
while (p < end && *p != '>')
p++;