Fix .NET resource leak detection leaked type lost (#1446)

Summary:
Hi all,

This is just a small fix tries to resolve the leaked type lost issue. It was excluded from previous CIL race condition PR due to irrelevance.

Thanks!

Pull Request resolved: https://github.com/facebook/infer/pull/1446

Reviewed By: skcho

Differential Revision: D28566755

Pulled By: ngorogiannis

fbshipit-source-id: 1c9938d9c
master
Xiaoyu Liu 4 years ago committed by Facebook GitHub Bot
parent 7e58392558
commit 53e6aec80d

@ -97,7 +97,9 @@ let release_resource access_path held =
let old_count = find_count access_path held in
let remove_resource_from_hash =
match old_count with
| NonTop count when count < 2 ->
| Top ->
Hashtbl.remove !type_map access_path
| NonTop count when count <= 0 ->
Hashtbl.remove !type_map access_path
| _ ->
()

Loading…
Cancel
Save