Line data Source code
1 : #include "../../burp.h" 2 : #include "../../alloc.h" 3 : #include "../../bu.h" 4 : #include "../../cstat.h" 5 : #include "lline.h" 6 : #include "sel.h" 7 : #include "status_client_ncurses.h" 8 : 9 33 : struct sel *sel_alloc(void) 10 : { 11 33 : return (struct sel *)calloc_w(1, sizeof(struct sel), __func__); 12 : } 13 : 14 33 : static void sel_free_content(struct sel *sel) 15 : { 16 33 : if(!sel) return; 17 33 : cstat_list_free(&sel->clist); 18 33 : llines_free(&sel->llines); 19 : // Will be freed elsewhere. 20 : //bu_list_free(&sel->backup); 21 : } 22 : 23 33 : void sel_free(struct sel **sel) 24 : { 25 33 : if(!sel || !*sel) return; 26 33 : sel_free_content(*sel); 27 33 : free_v((void **)sel); 28 : }