diff mbox series

[tvtime,3/4] Fix fifofile memory leak

Message ID 20250615153751.1707298-4-tasos@tasossah.com
State New
Headers show
Series Resolve various memory-related issues | expand

Commit Message

Tasos Sahanidis June 15, 2025, 3:21 p.m. UTC
The return value of get_tvtime_fifo_filename() should be freed, as it
calls asprintf() internally.

Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
---
 src/tvtimeconf.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/src/tvtimeconf.c b/src/tvtimeconf.c
index a58a402..2e78e8a 100644
--- a/src/tvtimeconf.c
+++ b/src/tvtimeconf.c
@@ -1033,6 +1033,7 @@  int config_parse_tvtime_command_line( config_t *ct, int argc, char **argv )
             return 0;
         }
         close( fifofd );
+        free( fifofile );
     }
 
 
@@ -1251,6 +1252,7 @@  int config_parse_tvtime_config_command_line( config_t *ct, int argc, char **argv
             return 0;
         }
         close( fifofd );
+        free( fifofile );
     }
 
     ct->doc = configsave_open( ct->config_filename );