Merge pull request #33516 from qarmin/small_fixes
Memory leaks and crash fixes
This commit is contained in:
commit
2143f46df2
10 changed files with 24 additions and 4 deletions
|
|
@ -91,6 +91,8 @@ RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path,
|
|||
if (r_error)
|
||||
*r_error = OK;
|
||||
|
||||
f->close();
|
||||
memdelete(f);
|
||||
return texture;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -741,6 +741,8 @@ RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_origi
|
|||
*r_error = OK;
|
||||
}
|
||||
|
||||
f->close();
|
||||
memdelete(f);
|
||||
return ogv_stream;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -484,6 +484,8 @@ RES ResourceFormatLoaderWebm::load(const String &p_path, const String &p_origina
|
|||
*r_error = OK;
|
||||
}
|
||||
|
||||
f->close();
|
||||
memdelete(f);
|
||||
return webm_stream;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue