summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-05-02 22:39:26 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-05-02 22:39:26 +0000
commit92d8597987c1f5c019c7fa98b89cb234bc2b8cd6 (patch)
tree0a998995a9de60712b734e4f13829720622c8162 /protocols
parent32d064875c38ff869528e9c480c10d2799e2caf7 (diff)
Yahoo:
-Fixed minor memory leak git-svn-id: http://svn.miranda-ng.org/main/trunk@13387 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Yahoo/src/yahoo.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index 9ffbc0ac99..a6690a2010 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -560,8 +560,6 @@ void CYahooProto::ext_got_calendar(const char *url, int type, const char *msg, i
void CYahooProto::ext_got_stealth(char *stealthlist)
{
- char **s;
- int found = 0;
char **stealth = NULL;
LOG(("[ext_got_stealth] list: %s", stealthlist));
@@ -574,13 +572,11 @@ void CYahooProto::ext_got_stealth(char *stealthlist)
if (getString( hContact, YAHOO_LOGINID, &dbv))
continue;
- found = 0;
-
- for(s = stealth; s && *s; s++) {
-
+ bool found = false;
+ for(char **s = stealth; s && *s; s++) {
if (mir_strcmpi(*s, dbv.pszVal) == 0) {
debugLogA("GOT id = %s", dbv.pszVal);
- found = 1;
+ found = true;
break;
}
}
@@ -598,9 +594,9 @@ void CYahooProto::ext_got_stealth(char *stealthlist)
if (getWord(hContact, "ApparentMode", 0))
delSetting(hContact, "ApparentMode");
}
-
db_free(&dbv);
}
+ y_strfreev(stealth);
}
void CYahooProto::ext_got_buddies(YList * buds)