diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2018-07-28 10:27:15 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2018-07-28 10:27:15 +0100 |
commit | cab5ff449ff11f7ca530c84eedf7238a1670d72e (patch) | |
tree | e32881d3ccd318184dc71050f61689fa730c0d22 /test | |
parent | 6ff678247eef5f5e8b2bbc20f39c73727afb3548 (diff) | |
download | libwapcaplet-cab5ff449ff11f7ca530c84eedf7238a1670d72e.tar.gz libwapcaplet-cab5ff449ff11f7ca530c84eedf7238a1670d72e.tar.bz2 |
Ensure that when we test unreffing a string to deletion, we don't then unref it again
Diffstat (limited to 'test')
-rw-r--r-- | test/basictests.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/basictests.c b/test/basictests.c index c23b547..7711da7 100644 --- a/test/basictests.c +++ b/test/basictests.c @@ -174,7 +174,8 @@ with_filled_context_setup(void) static void with_filled_context_teardown(void) { - lwc_string_unref(intern_one); + if (intern_one != NULL) + lwc_string_unref(intern_one); lwc_string_unref(intern_two); lwc_string_unref(intern_three); lwc_string_unref(intern_YAY); @@ -234,6 +235,7 @@ END_TEST START_TEST (test_lwc_string_unref_ok) { lwc_string_unref(intern_one); + intern_one = NULL; } END_TEST |