mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-07-29 09:33:49 +00:00
Fix file pointer leak on error path
This commit is contained in:
parent
5e050d7456
commit
0e86d4dbcb
@ -250,6 +250,7 @@ bool SePolicy::to_file(::rust::Utf8CStr file) const noexcept {
|
||||
pf.fp = fp;
|
||||
if (policydb_write(impl->db, &pf)) {
|
||||
LOGE("Fail to create policy image\n");
|
||||
fclose(fp);
|
||||
return false;
|
||||
}
|
||||
fclose(fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user