summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/avatars.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/avatars.cpp b/protocols/WhatsApp/src/avatars.cpp
index 39e521eff3..9bb7e926aa 100644
--- a/protocols/WhatsApp/src/avatars.cpp
+++ b/protocols/WhatsApp/src/avatars.cpp
@@ -136,7 +136,7 @@ bool CMPlugin::SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai)
req.szUrl = (char*)pszUrl;
req.nlc = hAvatarConn;
- NETLIBHTTPREQUEST *pReply = Netlib_HttpTransaction(hAvatarUser, &req);
+ NLHR_PTR pReply(Netlib_HttpTransaction(hAvatarUser, &req));
if (pReply == nullptr) {
hAvatarConn = nullptr;
debugLogA("Failed to retrieve avatar from url: %s", pszUrl);
@@ -163,6 +163,5 @@ bool CMPlugin::SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai)
}
else debugLogA("Error %d reading avatar from url: %s", pReply->resultCode, pszUrl);
- Netlib_FreeHttpRequest(pReply);
return bSuccess;
}