schema compile BUGFIX memory leak

Fixes #872
diff --git a/tests/src/test_tree_schema_compile.c b/tests/src/test_tree_schema_compile.c
index 6ebe998..90fb86f 100644
--- a/tests/src/test_tree_schema_compile.c
+++ b/tests/src/test_tree_schema_compile.c
@@ -2298,7 +2298,7 @@
     assert_non_null(type);
     assert_int_equal(3, type->refcount); /* 2x type reference, 1x default value's reference (typedf's default does not reference own type)*/
     assert_int_equal(LY_TYPE_STRING, type->basetype);
-    leaf = (struct lysc_node_leaf*)mod->compiled->data;
+    assert_non_null(leaf = (struct lysc_node_leaf*)mod->compiled->data);
     assert_string_equal("hello", leaf->dflt->realtype->plugin->print(leaf->dflt, LYD_XML, NULL, NULL, &dynamic));
     assert_int_equal(0, dynamic);
     assert_string_equal("xxx", leaf->units);