mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Fix for leak in Vprintf
This commit is contained in:
parent
b076e117ab
commit
6357768687
@ -574,8 +574,10 @@ nsLog::Vprintf(const char* format, va_list args)
|
||||
{
|
||||
nsAutoMonitor monitor(gLogMonitor);
|
||||
|
||||
const char* msg = PR_vsmprintf(format, args);
|
||||
return mSink->Print(this, msg);
|
||||
char* msg = PR_vsmprintf(format, args);
|
||||
nsresult rv = mSink->Print(this, msg);
|
||||
PR_smprintf_free(msg);
|
||||
return rv;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user