Fix CAS warnings: Potential leak of memory pointed to by 'toaster'

Memory Error: Memory leak: Potential leak of memory pointed to by
'toaster'
 1: Memory is allocated in /home/phenom/GIT/RetroShare/trunk/plugins/
VOIP/gui/VOIPToasterNotify.cpp:182
This commit is contained in:
Phenom 2017-04-19 14:04:50 +02:00 committed by csoler
parent b2b7d004cd
commit 90cd6233d8

View File

@ -180,7 +180,7 @@ ToasterItem* VOIPToasterNotify::testToasterItem(QString tag)
if (tag == "Invitation") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Invitation"), VOIPToasterItem::Invitation));
#endif
if (tag == "AudioCall") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Audio Call"), VOIPToasterItem::AudioCall));
if (tag == "VideoCall") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Video Call"), VOIPToasterItem::VideoCall));
if (tag == "VideoCall" || toaster == NULL) toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Video Call"), VOIPToasterItem::VideoCall));
return toaster;
}