{"action":"closed","issue":{"url":"https://api.github.com/repos/duckduckgo/android/issues/181","labels_url":"https://api.github.com/repos/duckduckgo/android/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/duckduckgo/android/issues/181/comments","events_url":"https://api.github.com/repos/duckduckgo/android/issues/181/events","html_url":"https://github.com/duckduckgo/android/issues/181","id":70402098,"number":181,"title":"Resource leaks -- cursor not closed -- found by Facebook's static analyzer","user":{"login":"dulmarod","id":7913252,"avatar_url":"https://avatars.githubusercontent.com/u/7913252?v=3","gravatar_id":"","url":"https://api.github.com/users/dulmarod","html_url":"https://github.com/dulmarod","followers_url":"https://api.github.com/users/dulmarod/followers","following_url":"https://api.github.com/users/dulmarod/following{/other_user}","gists_url":"https://api.github.com/users/dulmarod/gists{/gist_id}","starred_url":"https://api.github.com/users/dulmarod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dulmarod/subscriptions","organizations_url":"https://api.github.com/users/dulmarod/orgs","repos_url":"https://api.github.com/users/dulmarod/repos","events_url":"https://api.github.com/users/dulmarod/events{/privacy}","received_events_url":"https://api.github.com/users/dulmarod/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"fgei","id":8477147,"avatar_url":"https://avatars.githubusercontent.com/u/8477147?v=3","gravatar_id":"","url":"https://api.github.com/users/fgei","html_url":"https://github.com/fgei","followers_url":"https://api.github.com/users/fgei/followers","following_url":"https://api.github.com/users/fgei/following{/other_user}","gists_url":"https://api.github.com/users/fgei/gists{/gist_id}","starred_url":"https://api.github.com/users/fgei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgei/subscriptions","organizations_url":"https://api.github.com/users/fgei/orgs","repos_url":"https://api.github.com/users/fgei/repos","events_url":"https://api.github.com/users/fgei/events{/privacy}","received_events_url":"https://api.github.com/users/fgei/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-04-23T12:38:36Z","updated_at":"2015-05-04T08:53:34Z","closed_at":"2015-05-04T08:53:34Z","body":"Hello,\r\nThese resource leak reports, included with comments below, were found by running\r\n\r\nFacebook's Infer static analyzer on duckduckgo.\r\n\r\nRegards,\r\nDulma Rodriguez\r\nFacebook Static Analysis Tools Team\r\n\r\nFor the following bugs, the problem is that Cursor objects need to be closed.\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\n\r\nReport: Resource Leak: resource acquired by call to query(...) at line 631 is not released after line 644\r\n\r\n--------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\n\r\nReport: Resource Leak: resource acquired by call to query(...) at line 408 is not released after line 409\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 400 is not released after line 401\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 387 is not released after line 388\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 332 is not released after line 333\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 362 is not released after line 363\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 379 is not released after line 380\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 345 is not released after line 346\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 313 is not released after line 320\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 299 is not released after line 306\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 432 is not released after line 434\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 392 is not released after line 396\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 424 is not released after line 426\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 424 is not released after line 428\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFile: src/com/duckduckgo/mobile/android/db/DdgDB.java\r\nReport: Resource Leak: resource acquired by call to query(...) at line 499 is not released after line 506\r\n\r\n-------------------------------------------------------------------------------------\r\n\r\nFor this report, the problem is that os.flush could throw an exception, in which case os won't get closed.\r\n\r\nFile: src/com/duckduckgo/mobile/android/download/FileCache.java\r\nReport: Resource Leak: resource acquired by call to FileOutputStream(...) at line 48 is not released after line 53\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}