Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tarot
tarot
Commits
3bb3c0a1
Commit
3bb3c0a1
authored
Dec 14, 2019
by
Vivien Kraus
Browse files
Fix a memory leak in the XML test
parent
a1e56938
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libtarot/xml/check_xml.c
View file @
3bb3c0a1
...
...
@@ -48,6 +48,8 @@ unit_test (const char *xml)
abort
();
}
}
tarot_xml_parser_iterator_free
(
iterator
);
tarot_xml_parser_free
(
parser
);
rebuilt
=
tarot_game_save_to_xml_alloc
(
game
);
if
(
rebuilt
==
NULL
)
{
...
...
@@ -58,8 +60,8 @@ unit_test (const char *xml)
fprintf
(
stderr
,
"%s:%d: %s, size %lu
\n
"
,
__FILE__
,
__LINE__
,
rebuilt
,
strlen
(
rebuilt
));
abort
();
}
free
(
rebuilt
);
free
(
game
);
tarot_game_
free
(
rebuilt
);
tarot_game_
free
(
game
);
}
static
void
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment