Bug 25023

Summary: [Qt]Eliminating a leak in QNetworkReplyHandler
Product: WebKit Reporter: Tamas Szirbucz <Szirbucz.Tamas>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major CC: hausmann, kbalazs
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
proposed patch
hausmann: review-
proposed patch ariya.hidayat: review+

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-
proposed patch (1.05 KB, patch)
2009-04-08 05:49 PDT, Tamas Szirbucz
ariya.hidayat: review+
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
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.