Skip to content

Commit 8759971

Browse files
committed
Avoid pointless duplication in _end_element_handler
1 parent 81cdb8c commit 8759971

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

ext/xml/compat.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ _start_element_handler_ns(void *user, const xmlChar *name, const xmlChar *prefix
184184
static void
185185
_end_element_handler(void *user, const xmlChar *name)
186186
{
187-
xmlChar *qualified_name;
188187
XML_Parser parser = (XML_Parser) user;
189188

190189
if (parser->h_end_element == NULL) {
@@ -198,11 +197,7 @@ _end_element_handler(void *user, const xmlChar *name)
198197
return;
199198
}
200199

201-
qualified_name = xmlStrdup(name);
202-
203-
parser->h_end_element(parser->user, (const XML_Char *) qualified_name);
204-
205-
xmlFree(qualified_name);
200+
parser->h_end_element(parser->user, (const XML_Char *) name);
206201
}
207202

208203
static void

0 commit comments

Comments
 (0)