From 92d8597987c1f5c019c7fa98b89cb234bc2b8cd6 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 2 May 2015 22:39:26 +0000 Subject: Yahoo: -Fixed minor memory leak git-svn-id: http://svn.miranda-ng.org/main/trunk@13387 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Yahoo/src/yahoo.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'protocols/Yahoo/src/yahoo.cpp') 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) -- cgit v1.2.3