scanner: Plug memory leak in end_element()

This commit is contained in:
Martin Olsson 2012-07-09 11:35:55 +02:00 committed by Kristian Høgsberg
parent 00902b3815
commit e760ec9fa9

View file

@ -462,7 +462,7 @@ end_element(void *data, const XML_Char *name)
char *text = strndup(ctx->character_data, char *text = strndup(ctx->character_data,
ctx->character_data_length); ctx->character_data_length);
if (text) if (text)
ctx->description->text = strdup(text); ctx->description->text = text;
ctx->description = NULL; ctx->description = NULL;
} else if (strcmp(name, "request") == 0 || } else if (strcmp(name, "request") == 0 ||
strcmp(name, "event") == 0) { strcmp(name, "event") == 0) {