]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
free the newly created string memory
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sun, 2 Jan 2022 13:55:05 +0000 (19:25 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sun, 2 Jan 2022 13:55:05 +0000 (19:25 +0530)
vfo.c

diff --git a/vfo.c b/vfo.c
index 45d8dbce99ecdea396f82807352814c5905b3191..07c7f0fdca6e66444edf223f5fa55dab510e001e 100644 (file)
--- 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");