Closed Bug 284158 Opened 19 years ago Closed 19 years ago

SHGetMalloc API call is deprecated (in nsFileProtocolHandler.cpp)

Categories

(Core :: Networking: File, 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)

/netwerk/protocol/file/src/nsFileProtocolHandler.cpp, line 121 -- result =
SHGetMalloc(&pMalloc);

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"

-dave
Patches welcome? :-)
yep, when i get a tick i might just submit one :-)

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

r=dougt
Attachment #176129 - Flags: review?(dougt) → review+
Attachment #176129 - Flags: superreview?(bzbarsky)
Comment on attachment 176129 [details] [diff] [review]
Use CoTaskMemFree to release memory

sr=bzbarsky.  Requesting 1.8b3 approval; this looks like it should be quite
safe.
Attachment #176129 - Flags: superreview?(bzbarsky)
Attachment #176129 - Flags: superreview+
Attachment #176129 - Flags: approval1.8b3?
Comment on attachment 176129 [details] [diff] [review]
Use CoTaskMemFree to release memory

a=shaver
Attachment #176129 - Flags: approval1.8b3? → approval1.8b3+
Checked in for 1.8b3, but curiously enough the msdn documentation for GetURL()
does clearly say to call Free on an IMalloc* to deallocate the result... I guess
we're not the only ones with schizoid documentation.  ;)

David, thanks for the patch!
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: