Memory leak:

- getLocalInterfaces -> iptable = (MIB_IPADDRTABLE *) malloc(dwSize);
- main -> RshareSettings  *_settings = new RshareSettings();

ExtAddrFinder::~ExtAddrFinder - use free for pointer allocated with malloc


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2882 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-05-09 21:58:28 +00:00
parent 23a0b60e59
commit 465cd42463
3 changed files with 10 additions and 6 deletions

View File

@ -352,6 +352,8 @@ std::list<std::string> getLocalInterfaces()
addrs.push_back(inet_ntoa(addr)); addrs.push_back(inet_ntoa(addr));
} }
free (iptable);
return addrs; return addrs;
} }

View File

@ -267,7 +267,7 @@ ExtAddrFinder::~ExtAddrFinder()
delete _found ; delete _found ;
delete _searching ; delete _searching ;
delete _addr ; free (_addr) ;
} }
ExtAddrFinder::ExtAddrFinder() ExtAddrFinder::ExtAddrFinder()

View File

@ -161,13 +161,15 @@ int main(int argc, char *argv[])
QObject::connect(w->messengerWindow,SIGNAL(startChat(QTreeWidgetItem* )),w->peersDialog,SLOT(chatfriend(QTreeWidgetItem* ))) ; QObject::connect(w->messengerWindow,SIGNAL(startChat(QTreeWidgetItem* )),w->peersDialog,SLOT(chatfriend(QTreeWidgetItem* ))) ;
QObject::connect(w->idle, SIGNAL(secondsIdle(int)), w->messengerWindow, SLOT(checkAndSetIdle(int))); QObject::connect(w->idle, SIGNAL(secondsIdle(int)), w->messengerWindow, SLOT(checkAndSetIdle(int)));
/* only show window, if not startMinimized */
RshareSettings *_settings = new RshareSettings();
if(!_settings->value(QString::fromUtf8("StartMinimized"), false).toBool())
{ {
/* only show window, if not startMinimized */
RshareSettings _settings;
w->show(); if(!_settings.value(QString::fromUtf8("StartMinimized"), false).toBool())
{
w->show();
}
} }
/* Startup a Timer to keep the gui's updated */ /* Startup a Timer to keep the gui's updated */