mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-11-03 04:17:18 -05:00
mdata_destroy() is supposed to be idempotent
This commit is contained in:
parent
3d83b1ba66
commit
b923260d82
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user