From b628ffd96ce55f2fab838b4c9626dde873370ed1 Mon Sep 17 00:00:00 2001 From: ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ Date: Wed, 2 Oct 2019 22:30:46 +0800 Subject: Free the ticket history list after updated still not so good design --- tickethistory.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tickethistory.cxx b/tickethistory.cxx index d1af392..4243d7c 100644 --- a/tickethistory.cxx +++ b/tickethistory.cxx @@ -78,10 +78,12 @@ namespace RTClient { void TicketHistoryList::update(rtclient_ticket_history_list* list) { - if (list) + if (list) { for (size_t i = 0; i < list->length; i++) addTicketHistory (TicketHistory{list->histories[i]}); + rtclient_ticket_history_list_free(list); + } emit updated(); } -- cgit v1.3