From 7f7a7ede013701e6b83ad96beca6b5afebb3529d Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Wed, 1 Jun 2005 15:58:12 +0000 Subject: [PATCH] Use the non-deprecated deallocator to deallocate memory. Bug 284158, patch by David Gardiner , r=dougt, sr=bzbarsky, a=shaver --- netwerk/protocol/file/src/nsFileProtocolHandler.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/netwerk/protocol/file/src/nsFileProtocolHandler.cpp b/netwerk/protocol/file/src/nsFileProtocolHandler.cpp index 84c06b64a17..db4d992ad50 100644 --- a/netwerk/protocol/file/src/nsFileProtocolHandler.cpp +++ b/netwerk/protocol/file/src/nsFileProtocolHandler.cpp @@ -126,12 +126,7 @@ nsFileProtocolHandler::ReadURLFile(nsIFile* aFile, nsIURI** aURI) rv = NS_NewURI(aURI, lpTemp); // free the string that GetURL alloc'd - IMalloc* pMalloc; - result = SHGetMalloc(&pMalloc); - if (SUCCEEDED(result)) { - pMalloc->Free(lpTemp); - pMalloc->Release(); - } + CoTaskMemFree(lpTemp); } } urlFile->Release();