Changeset 1e52e1f
- Timestamp:
- 2010-07-11T10:30:27Z (14 years ago)
- Branches:
- master
- Children:
- af9f2ca
- Parents:
- e92c4f4
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ipc.c
re92c4f4 r1e52e1f 324 324 "Would you like to take over this session?", 325 325 ipc_child_cmd_takeover_yes, 326 ipc_child_cmd_takeover_no, irc );326 ipc_child_cmd_takeover_no, NULL, irc ); 327 327 328 328 /* This one's going to connect to accounts, avoid that. */ -
protocols/nogaim.c
re92c4f4 r1e52e1f 380 380 query_callback doit, query_callback dont ) 381 381 { 382 query_add( (irc_t *) ic->bee->ui_data, ic, msg, doit, dont, data );382 query_add( (irc_t *) ic->bee->ui_data, ic, msg, doit, dont, g_free, data ); 383 383 } 384 384 … … 478 478 data->handle = g_strdup( handle ); 479 479 query_add( (irc_t *) ic->bee->ui_data, ic, s, 480 imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, data );480 imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, g_free, data ); 481 481 } 482 482 … … 511 511 data->handle = g_strdup( handle ); 512 512 query_add( (irc_t *) ic->bee->ui_data, ic, s, 513 imcb_ask_add_cb_yes, imcb_ask_add_cb_no, data );513 imcb_ask_add_cb_yes, imcb_ask_add_cb_no, g_free, data ); 514 514 } 515 515 -
protocols/purple/purple.c
re92c4f4 r1e52e1f 877 877 q = g_strdup_printf( "Request: %s\n\n%s\n\n%s", title, primary, secondary ); 878 878 pqad->bee_data = query_add( local_bee->ui_data, purple_ic_by_pa( account ), q, 879 prplcb_request_action_yes, prplcb_request_action_no, pqad );879 prplcb_request_action_yes, prplcb_request_action_no, g_free, pqad ); 880 880 881 881 g_free( q ); -
query.c
re92c4f4 r1e52e1f 31 31 32 32 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, 33 query_callback yes, query_callback no, void *data ) 33 query_callback yes, query_callback no, query_callback free, 34 void *data ) 34 35 { 35 36 query_t *q = g_new0( query_t, 1 ); … … 39 40 q->yes = yes; 40 41 q->no = no; 42 q->free = free; 41 43 q->data = data; 42 44 … … 94 96 95 97 g_free( q->question ); 96 if( q->data ) g_free( q->data ); /* Memory leak... */ 98 if( q->free && q->data ) 99 q->free( q->data ); 97 100 g_free( q ); 98 101 } -
query.h
re92c4f4 r1e52e1f 33 33 struct im_connection *ic; 34 34 char *question; 35 query_callback yes, no ;35 query_callback yes, no, free; 36 36 void *data; 37 37 struct query *next; … … 39 39 40 40 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, 41 query_callback yes, query_callback no, void *data ); 41 query_callback yes, query_callback no, query_callback free, 42 void *data ); 42 43 void query_del( irc_t *irc, query_t *q ); 43 44 void query_del_by_conn( irc_t *irc, struct im_connection *ic );
Note: See TracChangeset
for help on using the changeset viewer.