Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9ce76512 authored by Corey O'Connor's avatar Corey O'Connor

Use strdup not qstrdup to avoid mlt_profile_close free'ing memory allocated with new.

This issue was identified using valgrind. Output:

==200828== Mismatched free() / delete / delete []
==200828==    at 0x4C2E668: free (in
/nix/store/270csszcn55xv52pjmvgr6cgy5grc8y5-valgrind-3.14.0/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==200828==    by 0xAFCBFD0: mlt_profile_close (in
/nix/store/l1dy6sf0sf6j7r7m45sg0xa8i8fxw4zq-mlt-6.13.0/lib/libmlt.so.6.13.0)
==200828==    by 0x7E52F8: GLWidget::~GLWidget() (glwidget.cpp:173)
parent bd12c4fa
......@@ -1270,7 +1270,7 @@ Mlt::Profile *GLWidget::profile()
void GLWidget::reloadProfile()
{
auto &profile = pCore->getCurrentProfile();
m_monitorProfile->get_profile()->description = qstrdup(profile->description().toUtf8().constData());
m_monitorProfile->get_profile()->description = strdup(profile->description().toUtf8().constData());
m_monitorProfile->set_colorspace(profile->colorspace());
m_monitorProfile->set_frame_rate(profile->frame_rate_num(), profile->frame_rate_den());
m_monitorProfile->set_height(profile->height());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment