Bug 1449358 - Consistently use PR memory functions. r=mayhemer

--HG--
extra : rebase_source : 99b43cdc931327c2fd3e28cba6eb76f71e3bab4b
This commit is contained in:
Alex Gaynor 2018-04-17 10:14:20 -04:00
parent 6ecac8dcbe
commit d452b92931

View File

@ -6,6 +6,7 @@
#include "nsAuth.h"
#include "nsAuthSambaNTLM.h"
#include "nsMemory.h"
#include "nspr.h"
#include "prenv.h"
#include "plbase64.h"
#include "prerror.h"
@ -24,7 +25,7 @@ nsAuthSambaNTLM::~nsAuthSambaNTLM()
// ntlm_auth reads from stdin regularly so closing our file handles
// should cause it to exit.
Shutdown();
free(mInitialMessage);
PR_Free(mInitialMessage);
}
void
@ -249,7 +250,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
nsCString request;
request.AssignLiteral("TT ");
request.Append(encoded);
free(encoded);
PR_Free(encoded);
request.Append('\n');
if (!WriteString(mToChildFD, request))
@ -266,7 +267,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
if (!buf)
return NS_ERROR_FAILURE;
*outToken = nsMemory::Clone(buf, *outTokenLen);
free(buf);
PR_Free(buf);
if (!*outToken) {
return NS_ERROR_OUT_OF_MEMORY;
}