diff --git a/infer/src/backend/interproc.ml b/infer/src/backend/interproc.ml index 8a8e2da66..338b3055a 100644 --- a/infer/src/backend/interproc.ml +++ b/infer/src/backend/interproc.ml @@ -671,7 +671,8 @@ let report_context_leaks pname sigma tenv = IList.fold_left (fun exps hpred -> match hpred with | Sil.Hpointsto (_, Eexp (exp, _), Sizeof (Tptr (Tstruct name, _), _, _)) - when AndroidFramework.is_context tenv name + when not (Exp.is_null_literal exp) + && AndroidFramework.is_context tenv name && not (AndroidFramework.is_application tenv name) -> (exp, name) :: exps | _ -> exps)