Closed Bug 284331 Opened 19 years ago Closed 19 years ago

SHGetMalloc API call is deprecated (in nsXREDirProvider.cpp)

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: David.R.Gardiner, Assigned: David.R.Gardiner)

References

Details

Attachments

(1 file, 1 obsolete file)

According to the MSDN documentation
(http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetmalloc.asp)

"This function should no longer be used. Use the CoTaskMemFree and
CoTaskMemAlloc functions in its place"

This is used in:
/toolkit/xre/nsXREDirProvider.cpp, line 598 -- if
(!SUCCEEDED(SHGetMalloc(&pMalloc)))

I hope I picked the right component - this was the only one I could find for XRE.

-dave
Assignee: nobody → david.gardiner
Status: NEW → ASSIGNED
Attachment #176126 - Flags: first-review?(darin)
Comment on attachment 176126 [details] [diff] [review]
Use CoTaskMemFree to release memory

>Index: nsXREDirProvider.cpp

>-  LPMALLOC pMalloc;
>   LPITEMIDLIST pItemIDList = NULL;
> 
>   if (!SUCCEEDED(SHGetMalloc(&pMalloc)))
>     return NS_ERROR_OUT_OF_MEMORY;

shouldn't you remove this line too?
Attachment #176126 - Flags: first-review?(darin) → first-review-
Attachment #176126 - Attachment is obsolete: true
Attachment #184475 - Flags: first-review?(darin)
Attachment #184475 - Flags: first-review?(darin) → first-review+
Comment on attachment 184475 [details] [diff] [review]
Use CoTaskMemFree to release memory

Requesting approval for this minor change.
Attachment #184475 - Flags: approval1.8b3?
Attachment #184475 - Flags: approval1.8b3? → approval1.8b3+
Assignee: david.gardiner → nobody
Status: ASSIGNED → NEW
Whiteboard: [checkin needed]
Assignee: nobody → david.gardiner
Seems as though this was never checked in, I'm assuming the branch approval is
no longer valid. Darin, did you want to check this in on the trunk?
fixed-on-trunk

yeah, hard for me to keep track of these things when their not assigned to me :-(
i'm not going to bother fixing this on the 1.8 branch.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Flags: in-testsuite-
Component: XRE Startup → Startup and Profile System
QA Contact: nobody → startup
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: