|Anonymous | Login | Signup for a new account||2021-09-26 20:21 CEST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001230||aMule||Misc||public||2007-12-31 14:32||2008-01-14 14:24|
|Target Version||Fixed in Version||SVN|
|Summary||0001230: UPnP: memory leak?|
|Description||Not really sure but probably there's a potential memory leak in UPnP.cpp.|
In fact, in constructor CPUpnpService, three different buffers are dinamically allocated using the new operator (these buffers are used as output for function upnpLib.m_UpnpResolveURL), but the delete operator is never called.
To fix this there are different ways:
1) minimalithic: simply add the delete
2) declare (statically, not dinamically) a char array and use it (not an idea of mine: just "copied" from same file, constructor CUPnPDevice).
Here I attached a patch for way 0000002.
Please notice that I don't knwow libupnp and that the memset used to clear the buffer probably are not useful.
The diff is against src/UPnP.cpp of aMule-CVS-20071231.
|Tags||No tags attached.|
|Fixed in Revision|
|Attached Files||UPnP.cpp.diff [^] (2,505 bytes) 2007-12-31 14:32 [Show Content]|
|The category is wrong (another mistake of mine), but I'm not able to edit it (even if I'm logged I don't find any "Update Issue" or similar command to edit the post).|
Thanks for reporting. This has now been fixed in SVN.
|2007-12-31 14:32||mr_hyde||New Issue|
|2007-12-31 14:32||mr_hyde||File Added: UPnP.cpp.diff|
|2007-12-31 14:32||mr_hyde||Operating System||=> Any|
|2008-01-04 08:51||mr_hyde||Note Added: 0002484|
|2008-01-06 14:39||Xaignar||Category||External Conn => Misc|
|2008-01-14 13:45||Xaignar||Status||new => acknowledged|
|2008-01-14 14:24||Xaignar||Status||acknowledged => resolved|
|2008-01-14 14:24||Xaignar||Fixed in Version||=> SVN|
|2008-01-14 14:24||Xaignar||Resolution||open => fixed|
|2008-01-14 14:24||Xaignar||Assigned To||=> Xaignar|
|2008-01-14 14:24||Xaignar||Note Added: 0002511|
|Copyright © 2000 - 2021 MantisBT Team|