Memory leak in BufferedSocket

Bug #194696 reported by Big Muscle
2
Affects Status Importance Assigned to Milestone
DC++
Fix Released
Low
Unassigned

Bug Description

This bug has been found in BufferedSocket::checkEvents();

When some function (for example threadConnect()) throws an exception, checkEvents will throw it to upper level (to BufferedSocket::run()) where it's handled. When this occurs, "p.second" in checkEvents() won't be deleted and will be lost, because it has already been removed from "tasks" before exception.

There are two possible solutions:
a) catch exception in checkEvents() where "p.second" will be deleted and then the exception will be thrown again.
b) make TaskData as "Smart Pointer" so it would delete itself when reference is lost.

Fredrik Ullner (ullner)
Changed in dcplusplus:
importance: Undecided → Low
Revision history for this message
Jacek Sieka (arnetheduck) wrote :

good bug report

Changed in dcplusplus:
status: New → Fix Committed
MikeJJ (mrmikejj)
Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.