diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-11-10 10:17:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-10 10:17:19 +0100 |
commit | 2143f46df26bde529db350f4b5965a6508385c2f (patch) | |
tree | d4bdab6220f7e24d7fad88087fb6c566bd6ff2b2 /modules | |
parent | 2fdeed1b4f3820bebf9f39d69eb8bd59e1c4f2f2 (diff) | |
parent | 7dda9309f91a71b9b3e2088f11bc322e3c15d669 (diff) |
Merge pull request #33516 from qarmin/small_fixes
Memory leaks and crash fixes
Diffstat (limited to 'modules')
-rw-r--r-- | modules/etc/texture_loader_pkm.cpp | 2 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 2 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp index 4d8af6883f..da6da74025 100644 --- a/modules/etc/texture_loader_pkm.cpp +++ b/modules/etc/texture_loader_pkm.cpp @@ -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; } diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index ed1a7f682b..12f07aa773 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -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; } diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 4ce0db3746..54b284f939 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -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; } |