Bug 1285098 - fix memory leak in nsImapServerResponseParser.cpp (coverity issue). r=aceman

This commit is contained in:
Magnus Melin 2017-12-13 22:43:28 +02:00
Родитель c3aac4e623
Коммит 17fe009ebd
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -942,8 +942,6 @@ void nsImapServerResponseParser::mailbox(nsImapMailboxSpec *boxSpec)
aURL->GetHost(boxSpec->mHostName);
NS_IF_RELEASE(aURL);
if (boxname)
PL_strfree( boxname);
// storage for the boxSpec is now owned by server connection
fServerConnection.DiscoverMailboxSpec(boxSpec);
@ -952,6 +950,9 @@ void nsImapServerResponseParser::mailbox(nsImapMailboxSpec *boxSpec)
if (NS_FAILED(fServerConnection.GetConnectionStatus()))
SetConnected(false);
}
if (boxname)
PL_strfree(boxname);
}