Merge "Fix building error for multi-line dontaudit statement"
diff --git a/public/file.te b/public/file.te
index 0f12f51..bf0a0b4 100644
--- a/public/file.te
+++ b/public/file.te
@@ -135,7 +135,7 @@
 # Default type for anything under /system/lib[64].
 type system_lib_file, file_type;
 # Default type for linker executable /system/bin/linker[64].
-type system_linker_exec, exec_type, file_type;
+type system_linker_exec, file_type;
 # Default type for linker config /system/etc/ld.config.*.
 type system_linker_config_file, file_type;
 # Default type for linker config /system/etc/seccomp_policy/*.
diff --git a/tests/sepol_wrap.cpp b/tests/sepol_wrap.cpp
index 41f13bf..15f3e70 100644
--- a/tests/sepol_wrap.cpp
+++ b/tests/sepol_wrap.cpp
@@ -116,11 +116,16 @@
     } else {
         out->alltypes = TYPE_ITER_LOOKUP;
         out->d = static_cast<type_datum *>(hashtab_search(db->p_types.table, type));
+        if (out->d == nullptr) {
+            std::cerr << "\"" << type << "\" does not exist" << std::endl;
+            free(out);
+            return nullptr;
+        }
         if (is_attr && out->d->flavor != TYPE_ATTRIB) {
             std::cerr << "\"" << type << "\" MUST be an attribute in the policy" << std::endl;
             free(out);
             return nullptr;
-        } else if (!is_attr && out->d->flavor !=TYPE_TYPE) {
+        } else if (!is_attr && out->d->flavor != TYPE_TYPE) {
             std::cerr << "\"" << type << "\" MUST be a type in the policy" << std::endl;
             free(out);
             return nullptr;