[vlc-commits] medialib: fs: Ensure SD are destroyed first
Hugo Beauzée-Luyssen
git at videolan.org
Mon Dec 16 11:53:39 CET 2019
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Nov 20 12:06:53 2019 +0100| [367327b5e9f6f19d996925e93f563e2d06e4ca37] | committer: Hugo Beauzée-Luyssen
medialib: fs: Ensure SD are destroyed first
Otherwise a callback during deletion could end up using already
destroyed member variables
Fix #23085
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=367327b5e9f6f19d996925e93f563e2d06e4ca37
---
modules/misc/medialibrary/fs/fs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/misc/medialibrary/fs/fs.h b/modules/misc/medialibrary/fs/fs.h
index 04c2e9e99f..d56853f457 100644
--- a/modules/misc/medialibrary/fs/fs.h
+++ b/modules/misc/medialibrary/fs/fs.h
@@ -90,13 +90,13 @@ public:
private:
vlc_object_t *const m_parent;
const std::string m_scheme;
- using SdPtr = std::unique_ptr<services_discovery_t, decltype(&vlc_sd_Destroy)>;
- std::vector<SdPtr> m_sds;
IFileSystemFactoryCb *m_callbacks;
vlc::threads::mutex m_mutex;
vlc::threads::condition_variable m_itemAddedCond;
std::vector<std::shared_ptr<IDevice>> m_devices;
+ using SdPtr = std::unique_ptr<services_discovery_t, decltype(&vlc_sd_Destroy)>;
+ std::vector<SdPtr> m_sds;
};
} /* namespace medialibrary */
More information about the vlc-commits
mailing list