Fix for null pointer access - Bug #17597 - r: jefft approved: chofmann

This commit is contained in:
rhp%netscape.com 1999-11-03 22:34:30 +00:00
Родитель a0e755871b
Коммит 64477c52ff
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -827,7 +827,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
nsString replyTo; nsString replyTo;
nsString newgroups; nsString newgroups;
nsString followUpTo; nsString followUpTo;
char *outCString; char *outCString = nsnull;
PRUnichar emptyUnichar = 0; PRUnichar emptyUnichar = 0;
mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, &outCString); mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, &outCString);
@ -835,7 +835,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
{ {
// Convert fields to UTF-8 // Convert fields to UTF-8
ConvertToUnicode(aCharset, outCString, replyTo); ConvertToUnicode(aCharset, outCString, replyTo);
PR_Free(outCString); PR_FREEIF(outCString);
} }
mHeaders->ExtractHeader(HEADER_NEWSGROUPS, PR_FALSE, &outCString); mHeaders->ExtractHeader(HEADER_NEWSGROUPS, PR_FALSE, &outCString);
@ -843,7 +843,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
{ {
// Convert fields to UTF-8 // Convert fields to UTF-8
ConvertToUnicode(aCharset, outCString, newgroups); ConvertToUnicode(aCharset, outCString, newgroups);
PR_Free(outCString); PR_FREEIF(outCString);
} }
mHeaders->ExtractHeader(HEADER_FOLLOWUP_TO, PR_FALSE, &outCString); mHeaders->ExtractHeader(HEADER_FOLLOWUP_TO, PR_FALSE, &outCString);
@ -851,7 +851,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
{ {
// Convert fields to UTF-8 // Convert fields to UTF-8
ConvertToUnicode(aCharset, outCString, followUpTo); ConvertToUnicode(aCharset, outCString, followUpTo);
PR_Free(outCString); PR_FREEIF(outCString);
} }
if (! replyTo.IsEmpty()) if (! replyTo.IsEmpty())