View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001230aMuleMiscpublic2007-12-31 14:322008-01-14 14:24
Reportermr_hyde 
Assigned ToXaignar 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product VersionSVN 
Target VersionFixed in VersionSVN 
Summary0001230: UPnP: memory leak?
DescriptionNot 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.

Bye,
  Mr Hyde
TagsNo tags attached.
Fixed in Revision
Operating SystemAny
Attached Filesdiff file icon UPnP.cpp.diff [^] (2,505 bytes) 2007-12-31 14:32 [Show Content]

- Relationships

-  Notes
(0002484)
mr_hyde (reporter)
2008-01-04 08:51

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).
(0002511)
Xaignar (manager)
2008-01-14 14:24

Thanks for reporting. This has now been fixed in SVN.

Cheers.

- Issue History
Date Modified Username Field Change
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 - 2024 MantisBT Team
Powered by Mantis Bugtracker