summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 23:34:36 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 23:34:36 -0500
commit22973db5032189f97bf8ad190981d71c890bf151 (patch)
tree6742abe28ec17843e938533e42cbcd87bb4eaede
parentd80e610cd5bc6a9f6c0cc139e2f07e007fa05428 (diff)
downloadUXP-22973db5032189f97bf8ad190981d71c890bf151.tar
UXP-22973db5032189f97bf8ad190981d71c890bf151.tar.gz
UXP-22973db5032189f97bf8ad190981d71c890bf151.tar.lz
UXP-22973db5032189f97bf8ad190981d71c890bf151.tar.xz
UXP-22973db5032189f97bf8ad190981d71c890bf151.zip
Bug 1517464 - Fix crash in SMTP DTOR by properly initializing/testing pointer.
Tag #1273
-rw-r--r--mailnews/compose/src/nsSmtpProtocol.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mailnews/compose/src/nsSmtpProtocol.cpp b/mailnews/compose/src/nsSmtpProtocol.cpp
index 522890c78..89607224e 100644
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -229,13 +229,14 @@ NS_INTERFACE_MAP_END_INHERITING(nsMsgAsyncWriteProtocol)
#endif
nsSmtpProtocol::nsSmtpProtocol(nsIURI * aURL)
: nsMsgAsyncWriteProtocol(aURL)
+ , m_dataBuf(nullptr)
{
}
nsSmtpProtocol::~nsSmtpProtocol()
{
// free our local state
- PR_Free(m_dataBuf);
+ PR_FREEIF(m_dataBuf);
}
void nsSmtpProtocol::Initialize(nsIURI * aURL)