Closed
Bug 528964
Opened 16 years ago
Closed 14 years ago
Memory leak in GRE_GetGREPathWithProperties
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
INCOMPLETE
mozilla1.9.3a1
People
(Reporter: zbychs, Assigned: zbychs)
References
()
Details
(Keywords: memory-leak, Whiteboard: [MemShrink:P3])
Attachments
(1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 4.0.20506) FBSMTWB
Build Identifier: mozilla-1.9.2
Memory allocated on line 171 of /xpcom/glue/nsGREGlue.cpp is never freed.
Reproducible: Always
Attachment #413495 -
Flags: review?(benjamin)
Updated•16 years ago
|
Attachment #413495 -
Flags: review?(benjamin) → review+
Updated•16 years ago
|
Assignee: nobody → zbychs
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: checkin-needed
OS: Windows XP → All
Hardware: x86 → All
Comment 2•16 years ago
|
||
Comment on attachment 413495 [details] [diff] [review]
Patch that eliminates the memory leak.
Requesting approval1.9.2 for this memory leak fix.
Attachment #413495 -
Flags: approval1.9.2?
Comment 3•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Comment 4•16 years ago
|
||
nsGREGlue.cpp
/tools/gcc/bin/g++ -o nsGREGlue.o -c -I../../dist/system_wrappers -include /builds/slave/comm-central-trunk-linux/build/mozilla/config/gcc_hidden.h -DMOZ_SUITE=1 -DOSTYPE=\"Linux2.6.18-8\" -DOSARCH=Linux -DTARGET_XPCOM_ABI=\"x86-gcc3\" -I/builds/slave/comm-central-trunk-linux/build/mozilla/xpcom/glue/../build -I/builds/slave/comm-central-trunk-linux/build/mozilla/xpcom/glue -I. -I../../dist/include -I../../dist/include/nsprpub -I/builds/slave/comm-central-trunk-linux/build/objdir/mozilla/dist/include/nspr -I/builds/slave/comm-central-trunk-linux/build/objdir/mozilla/dist/include/nss -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -gstabs+ -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -finline-limit=50 -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsGREGlue.pp /builds/slave/comm-central-trunk-linux/build/mozilla/xpcom/glue/nsGREGlue.cpp
/builds/slave/comm-central-trunk-linux/build/objdir/mozilla/config/nsinstall -D ../../dist/sdk/lib
/builds/slave/comm-central-trunk-linux/build/mozilla/xpcom/glue/nsGREGlue.cpp: In function ‘nsresult GRE_GetGREPathWithProperties(const GREVersionRange*, PRUint32, const GREProperty*, PRUint32, char*, PRUint32)’:
/builds/slave/comm-central-trunk-linux/build/mozilla/xpcom/glue/nsGREGlue.cpp:171: error: no matching function for call to ‘nsAutoArrayPtr<GREProperty>::nsAutoArrayPtr(nsAutoArrayPtr<GREProperty>)’
../../dist/include/nsAutoPtr.h:554: note: candidates are: nsAutoArrayPtr<T>::nsAutoArrayPtr(nsAutoArrayPtr<T>&) [with T = GREProperty]
../../dist/include/nsAutoPtr.h:548: note: nsAutoArrayPtr<T>::nsAutoArrayPtr(T*) [with T = GREProperty]
/builds/slave/comm-central-trunk-linux/build/mozilla/xpcom/glue/nsGREGlue.cpp:171: error: initializing temporary from result of ‘nsAutoArrayPtr<T>::nsAutoArrayPtr(T*) [with T = GREProperty]’
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•16 years ago
|
Attachment #413495 -
Attachment is obsolete: true
Attachment #413495 -
Flags: approval1.9.2?
Comment 5•16 years ago
|
||
Comment on attachment 413495 [details] [diff] [review]
Patch that eliminates the memory leak.
>- GREProperty *allProperties = new GREProperty[propertiesLength + 1];
>+ nsAutoArrayPtr<GREProperty> allProperties = new GREProperty[propertiesLength + 1];
You probably need to explicitly use the constructor form here, i.e.
nsAutoArrayPtr<GREProperty> allProperties(new GREProperty[propertiesLength + 1]);
Updated•14 years ago
|
Whiteboard: [MemShrink]
![]() |
||
Comment 6•14 years ago
|
||
Ping? The patch bounced and was never followed up.
Whiteboard: [MemShrink] → [MemShrink:P3]
Comment 7•14 years ago
|
||
The code in question has been removed.
Status: REOPENED → RESOLVED
Closed: 16 years ago → 14 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•