comparison libfaim/aim_login.c @ 715:58106806ac2b

[gaim-migrate @ 725] yay committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 18 Aug 2000 00:21:53 +0000
parents 6d78b988b479
children 58a6e6e26695
comparison
equal deleted inserted replaced
714:d7557252bfb1 715:58106806ac2b
251 #endif 251 #endif
252 /* 252 /*
253 * No matter what, we should have a screen name. 253 * No matter what, we should have a screen name.
254 */ 254 */
255 sn = aim_gettlv_str(tlvlist, 0x0001, 1); 255 sn = aim_gettlv_str(tlvlist, 0x0001, 1);
256 memcpy(sess->logininfo.screen_name, sn, strlen(sn)); 256 strncpy(sess->logininfo.screen_name, sn, strlen(sn));
257 sn[(strlen(sn))] = '\0'; 257 free(sn);
258 258
259 /* 259 /*
260 * Check for an error code. If so, we should also 260 * Check for an error code. If so, we should also
261 * have an error url. 261 * have an error url.
262 */ 262 */
263 if (aim_gettlv(tlvlist, 0x0008, 1)) { 263 if (aim_gettlv(tlvlist, 0x0008, 1)) {
309 if (userfunc) 309 if (userfunc)
310 ret = userfunc(sess, command); 310 ret = userfunc(sess, command);
311 311
312 aim_freetlvchain(&tlvlist); 312 aim_freetlvchain(&tlvlist);
313 313
314 /* These have been clobbered by the freetlvchain */ 314 if (sess->logininfo.BOSIP) {
315 sess->logininfo.BOSIP = NULL; 315 free(sess->logininfo.BOSIP);
316 sess->logininfo.email = NULL; 316 sess->logininfo.BOSIP = NULL;
317 sess->logininfo.errorurl = NULL; 317 }
318 if (sess->logininfo.email) {
319 free(sess->logininfo.email);
320 sess->logininfo.email = NULL;
321 }
322 if (sess->logininfo.errorurl) {
323 free(sess->logininfo.errorurl);
324 sess->logininfo.errorurl = NULL;
325 }
318 326
319 return ret; 327 return ret;
320 } 328 }
321 329
322 /* 330 /*