Ticket #7000: libs_libmythui-resource-leak

File libs_libmythui-resource-leak, 610 bytes (added by Erik Hovland <erik@…>, 11 years ago)

Close a memory leak

Line 
1lirc_client.c has a memory leak of the command in the error path.
2
3From: Erik Hovland <erik@hovland.org>
4
5
6---
7
8 mythtv/libs/libmythui/lirc_client.c |    1 +
9 1 files changed, 1 insertions(+), 0 deletions(-)
10
11
12diff --git a/mythtv/libs/libmythui/lirc_client.c b/mythtv/libs/libmythui/lirc_client.c
13index fc10390..4667b6c 100644
14--- a/mythtv/libs/libmythui/lirc_client.c
15+++ b/mythtv/libs/libmythui/lirc_client.c
16@@ -925,6 +925,7 @@ int lirc_readconfig(const struct lirc_state *state,
17        strcat(command, filename);
18       
19        ret=system(command);
20+       free(command);
21       
22        if(ret==-1 || WEXITSTATUS(ret)!=EXIT_SUCCESS)
23        {