Changeset 098a75b
- Timestamp:
- 2015-03-22T13:35:08Z (10 years ago)
- Branches:
- master
- Children:
- b95d03b
- Parents:
- 2dd23da
- git-author:
- dequis <dx@…> (21-03-15 08:26:20)
- git-committer:
- dequis <dx@…> (22-03-15 13:35:08)
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
r2dd23da r098a75b 235 235 } else { 236 236 /* Modules can swallow messages. */ 237 return TRUE;237 goto cleanup; 238 238 } 239 239 } … … 250 250 wrapped = word_wrap(msg, 425); 251 251 irc_send_msg(iu, "PRIVMSG", dst, wrapped, prefix); 252 253 252 g_free(wrapped); 253 254 cleanup: 254 255 g_free(prefix); 255 256 g_free(msg); … … 291 292 292 293 irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL); 294 295 g_string_free(msg, TRUE); 293 296 294 297 return TRUE; -
lib/ssl_gnutls.c
r2dd23da r098a75b 124 124 125 125 if (conn->fd < 0) { 126 g_free(conn->hostname); 126 127 g_free(conn); 127 128 return NULL; … … 314 315 if (source == -1) { 315 316 conn->func(conn->data, 0, NULL, cond); 317 g_free(conn->hostname); 316 318 g_free(conn); 317 319 return FALSE; … … 355 357 conn->func(conn->data, 0, NULL, cond); 356 358 357 gnutls_deinit(conn->session); 358 closesocket(conn->fd); 359 360 g_free(conn); 359 ssl_disconnect(conn); 361 360 } 362 361 } else { … … 364 363 conn->func(conn->data, stver, NULL, cond); 365 364 366 gnutls_deinit(conn->session); 367 closesocket(conn->fd); 368 369 g_free(conn); 365 ssl_disconnect(conn); 370 366 } else { 371 367 /* For now we can't handle non-blocking perfectly everywhere... */ -
otr.c
r2dd23da r098a75b 287 287 void otr_irc_free(irc_t *irc) 288 288 { 289 set_t *s; 289 290 otr_t *otr = irc->otr; 290 291 … … 292 293 b_event_remove(otr->timer); 293 294 otrl_userstate_free(otr->us); 295 296 s = set_find(&irc->b->set, "otr_policy"); 297 g_slist_free(s->eval_data); 298 294 299 if (otr->keygen) { 295 300 kill(otr->keygen, SIGTERM); … … 434 439 ic->acc->user, ic->acc->prpl->name, iu->bu->handle, msg, &newmsg, 435 440 &tlvs, NULL, NULL, NULL); 441 442 if (tlvs) { 443 otrl_tlv_free(tlvs); 444 } 436 445 437 446 if (ignore_msg) { … … 472 481 /* libotr wants us to replace our message */ 473 482 /* NB: caller will free old msg */ 474 msg = g_strdup(otrmsg);483 msg = st ? NULL : g_strdup(otrmsg); 475 484 otrl_message_free(otrmsg); 476 485 } … … 1325 1334 1326 1335 log_message(LOGLVL_INFO, "otr: %s", msg); 1336 1337 g_free(msg); 1327 1338 } 1328 1339 … … 2075 2086 } 2076 2087 } 2077 2078 /* vim: set noet ts=4 sw=4: */ -
protocols/jabber/jabber_util.c
r2dd23da r098a75b 566 566 567 567 if ((s = strchr(jid, '=')) == NULL) { 568 g_free(jid); 568 569 return NULL; 569 570 } -
protocols/msn/msn_util.c
r2dd23da r098a75b 174 174 }; 175 175 176 static void msn_buddy_ask_ yes(void *data)176 static void msn_buddy_ask_free(void *data) 177 177 { 178 178 struct msn_buddy_ask_data *bla = data; 179 180 msn_buddy_list_add(bla->ic, MSN_BUDDY_AL, bla->handle, bla->realname, NULL);181 182 imcb_ask_add(bla->ic, bla->handle, NULL);183 179 184 180 g_free(bla->handle); … … 187 183 } 188 184 185 static void msn_buddy_ask_yes(void *data) 186 { 187 struct msn_buddy_ask_data *bla = data; 188 189 msn_buddy_list_add(bla->ic, MSN_BUDDY_AL, bla->handle, bla->realname, NULL); 190 191 imcb_ask_add(bla->ic, bla->handle, NULL); 192 193 msn_buddy_ask_free(bla); 194 } 195 189 196 static void msn_buddy_ask_no(void *data) 190 197 { … … 193 200 msn_buddy_list_add(bla->ic, MSN_BUDDY_BL, bla->handle, bla->realname, NULL); 194 201 195 g_free(bla->handle); 196 g_free(bla->realname); 197 g_free(bla); 202 msn_buddy_ask_free(bla); 198 203 } 199 204 … … 216 221 "The user %s (%s) wants to add you to his/her buddy list.", 217 222 bu->handle, bu->fullname); 218 imcb_ask(bu->ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no); 223 224 imcb_ask_with_free(bu->ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no, msn_buddy_ask_free); 219 225 } 220 226 -
protocols/nogaim.c
r2dd23da r098a75b 498 498 }; 499 499 500 static void imcb_ask_ auth_cb_no(void *data)500 static void imcb_ask_cb_free(void *data) 501 501 { 502 502 struct imcb_ask_cb_data *cbd = data; 503 504 cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);505 503 506 504 g_free(cbd->handle); … … 508 506 } 509 507 508 static void imcb_ask_auth_cb_no(void *data) 509 { 510 struct imcb_ask_cb_data *cbd = data; 511 512 cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle); 513 514 imcb_ask_cb_free(cbd); 515 } 516 510 517 static void imcb_ask_auth_cb_yes(void *data) 511 518 { … … 514 521 cbd->ic->acc->prpl->auth_allow(cbd->ic, cbd->handle); 515 522 516 g_free(cbd->handle); 517 g_free(cbd); 523 imcb_ask_cb_free(cbd); 518 524 } 519 525 … … 535 541 data->handle = g_strdup(handle); 536 542 query_add((irc_t *) ic->bee->ui_data, ic, s, 537 imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, g_free, data); 538 } 539 540 541 static void imcb_ask_add_cb_no(void *data) 542 { 543 g_free(((struct imcb_ask_cb_data*) data)->handle); 544 g_free(data); 543 imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, imcb_ask_cb_free, data); 544 545 g_free(s); 545 546 } 546 547 … … 551 552 cbd->ic->acc->prpl->add_buddy(cbd->ic, cbd->handle, NULL); 552 553 553 imcb_ask_ add_cb_no(data);554 imcb_ask_cb_free(data); 554 555 } 555 556 556 557 void imcb_ask_add(struct im_connection *ic, const char *handle, const char *realname) 557 558 { 558 struct imcb_ask_cb_data *data = g_new0(struct imcb_ask_cb_data, 1);559 struct imcb_ask_cb_data *data; 559 560 char *s; 560 561 … … 564 565 } 565 566 567 data = g_new0(struct imcb_ask_cb_data, 1); 568 566 569 s = g_strdup_printf("The user %s is not in your buddy list yet. Do you want to add him/her now?", handle); 567 570 … … 569 572 data->handle = g_strdup(handle); 570 573 query_add((irc_t *) ic->bee->ui_data, ic, s, 571 imcb_ask_add_cb_yes, imcb_ask_add_cb_no, g_free, data); 574 imcb_ask_add_cb_yes, imcb_ask_cb_free, imcb_ask_cb_free, data); 575 576 g_free(s); 572 577 } 573 578 -
storage_xml.c
r2dd23da r098a75b 128 128 } 129 129 } else { 130 g_free(pass_cr); 131 g_free(password); 130 132 return XT_ABORT; 131 133 }
Note: See TracChangeset
for help on using the changeset viewer.