From: Ramakrishnan Muthukrishnan Date: Sun, 2 Jan 2022 13:55:05 +0000 (+0530) Subject: free the newly created string memory X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/$top_link?a=commitdiff_plain;h=3982d3c0f3555f8145c7d7c698ad78278d82d79d;p=pihpsdr.git free the newly created string memory --- diff --git a/vfo.c b/vfo.c index 45d8dbc..07c7f0f 100644 --- a/vfo.c +++ b/vfo.c @@ -1036,6 +1036,12 @@ void vfo_update() { cairo_set_source_rgb(cr, 0.0, 1.0, 0.0); cairo_show_text(cr, vfo_texts[2]); + // free the memory + free(vfo_texts[0]); + free(vfo_texts[1]); + free(vfo_texts[2]); + free(vfo_texts); + sprintf(temp_text,"VFO B: %0lld.%06lld",bf/(long long)1000000,bf%(long long)1000000); if(txvfo == 1 && (isTransmitting() || oob)) { if (oob) sprintf(temp_text,"VFO B: Out of band");