WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 25023
[Qt]Eliminating a leak in QNetworkReplyHandler
https://bugs.webkit.org/show_bug.cgi?id=25023
Summary
[Qt]Eliminating a leak in QNetworkReplyHandler
Tamas Szirbucz
Reported
2009-04-03 02:49:56 PDT
We found that QNetworkReplyHandler::m_reply has never been freed in some cases because QNetworkReplyHandler::release sets it to zero. Through that the call of deleteLater on it in QNetworkRepyHandler is useless. We did not see any problem when we had removed the problematic line.
Attachments
proposed patch
(1.22 KB, patch)
2009-04-03 02:52 PDT
,
Tamas Szirbucz
hausmann
: review-
Details
Formatted Diff
Diff
proposed patch
(1.05 KB, patch)
2009-04-08 05:49 PDT
,
Tamas Szirbucz
ariya.hidayat
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tamas Szirbucz
Comment 1
2009-04-03 02:52:35 PDT
Created
attachment 29223
[details]
proposed patch
Simon Hausmann
Comment 2
2009-04-03 07:28:42 PDT
Comment on
attachment 29223
[details]
proposed patch I agree that there's probably a leak, but the purpose of release() is to transfer the ownership to the caller. If we don't reset m_reply to 0 a subsequent call to release() will return a pointer to the object whos ownership we transferred to the previous caller. In other words: I think the caller in abort() for example should call deleteLater on the reply(). Does that work for you?
Tamas Szirbucz
Comment 3
2009-04-08 05:48:24 PDT
Ops, sorry for the late response, this bug had got out of my mind. You are absolute right, the solution is to simply call deleteLater on reply in abort.
Tamas Szirbucz
Comment 4
2009-04-08 05:49:06 PDT
Created
attachment 29330
[details]
proposed patch
Ariya Hidayat
Comment 5
2009-04-22 05:10:23 PDT
Landed in
r42747
. Thanks!
http://trac.webkit.org/changeset/42747
Balazs Kelemen
Comment 6
2010-03-16 06:06:41 PDT
***
Bug 26922
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug