summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_rates.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-21 18:47:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-21 18:47:29 +0000
commit53e9e2e4cb7ab3c9b40b40218ca3e109ab908694 (patch)
treea1450a34edbb204bfb2e33b7a8c6da9ec65cf3dc /protocols/IcqOscarJ/src/icq_rates.cpp
parent01b1b443b89cdff245c23c03af37718c7d0c90cd (diff)
handle leak in ICQ
git-svn-id: http://svn.miranda-ng.org/main/trunk@4153 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_rates.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_rates.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/IcqOscarJ/src/icq_rates.cpp b/protocols/IcqOscarJ/src/icq_rates.cpp
index cfe8a9508f..55ac226d31 100644
--- a/protocols/IcqOscarJ/src/icq_rates.cpp
+++ b/protocols/IcqOscarJ/src/icq_rates.cpp
@@ -492,8 +492,7 @@ void rates_queue::putItem(rates_queue_item *pItem, int nMinDelay)
if (nDelay < nMinDelay) nDelay = nMinDelay;
initDelay(nDelay, &rates_queue::processQueue);
}
- else
- listsMutex->Leave();
+ else listsMutex->Leave();
}
@@ -502,8 +501,7 @@ int CIcqProto::handleRateItem(rates_queue_item *item, int nQueueType, int nMinDe
rates_queue *pQueue = NULL;
m_ratesMutex->Enter();
- switch (nQueueType)
- {
+ switch (nQueueType) {
case RQT_REQUEST:
pQueue = m_ratesQueue_Request;
break;
@@ -512,10 +510,9 @@ int CIcqProto::handleRateItem(rates_queue_item *item, int nQueueType, int nMinDe
break;
}
- if (pQueue)
- {
- if (bAllowDelay && (item->isOverRate(pQueue->waitLevel) || nMinDelay))
- { // limit reached or min delay configured, add to queue
+ if (pQueue) {
+ if (bAllowDelay && (item->isOverRate(pQueue->waitLevel) || nMinDelay)) {
+ // limit reached or min delay configured, add to queue
pQueue->putItem(item, nMinDelay);
m_ratesMutex->Leave();