Commit b923260d authored by Moritz Grimm's avatar Moritz Grimm
Browse files

mdata_destroy() is supposed to be idempotent

parent 3d83b1ba
......@@ -277,7 +277,8 @@ mdata_destroy(struct mdata **md_p)
{
struct mdata *md = *md_p;
_mdata_clear(md);
if (md)
_mdata_clear(md);
xfree(md);
*md_p = NULL;
}
......
......@@ -193,6 +193,7 @@ setup_checked(void)
void
teardown_checked(void)
{
mdata_destroy(&md);
mdata_destroy(&md);
ck_assert_ptr_eq(md, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment