[context leaks] don't report context leak if reachable context type is null

Reviewed By: jeremydubreil

Differential Revision: D4136930

fbshipit-source-id: 4b18c0b
master
Sam Blackshear 8 years ago committed by Facebook Github Bot
parent 9921e3c427
commit f35a969def

@ -671,7 +671,8 @@ let report_context_leaks pname sigma tenv =
IList.fold_left IList.fold_left
(fun exps hpred -> match hpred with (fun exps hpred -> match hpred with
| Sil.Hpointsto (_, Eexp (exp, _), Sizeof (Tptr (Tstruct name, _), _, _)) | 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) -> && not (AndroidFramework.is_application tenv name) ->
(exp, name) :: exps (exp, name) :: exps
| _ -> exps) | _ -> exps)

Loading…
Cancel
Save