1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:37:45 +00:00

Ladybird: Store the WebContent QSocketNotifier on the stack

This was being heap allocated with naked-new and never freed. Caught by
AddressSanitizer.
This commit is contained in:
Timothy Flynn 2023-01-31 08:45:11 -05:00 committed by Linus Groh
parent ac80475a1f
commit 9fd54e1f90
2 changed files with 7 additions and 5 deletions

View file

@ -19,11 +19,11 @@
#include <LibGfx/StandardCursor.h>
#include <LibWeb/CSS/PreferredColorScheme.h>
#include <LibWeb/CSS/Selector.h>
#include <LibWebView/ViewImplementation.h>
#include <LibWeb/Forward.h>
#include <LibWebView/ViewImplementation.h>
#include <QAbstractScrollArea>
#include <QPointer>
#include <QSocketNotifier>
class QTextEdit;
class QLineEdit;
@ -196,6 +196,7 @@ private:
Gfx::IntRect m_viewport_rect;
void handle_web_content_process_crash();
QSocketNotifier m_web_content_notifier { QSocketNotifier::Type::Read };
RefPtr<Gfx::Bitmap> m_backup_bitmap;