static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms,
                             const char *match_str, size_t match_len)
 {
-       struct aa_perms tmp;
+       struct aa_perms tmp = { };
        struct aa_dfa *dfa;
        unsigned int state = 0;
 
                dfa = profile->file.dfa;
                state = aa_dfa_match_len(dfa, profile->file.start,
                                         match_str + 1, match_len - 1);
-               tmp = nullperms;
                if (state) {
                        struct path_cond cond = { };
 
                                         match_str, match_len);
                if (state)
                        aa_compute_perms(dfa, state, &tmp);
-               else
-                       tmp = nullperms;
        }
        aa_apply_modes_to_perms(profile, &tmp);
        aa_perms_accum_raw(perms, &tmp);