From 19568dd4139630b33798221ce7da64dfd21cf229 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Fri, 23 Jul 2010 21:40:11 +0000 Subject: [PATCH] * Fix a premature free when parsing TiVo commands. --- tivo_commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tivo_commands.c b/tivo_commands.c index 19ce1e1..c7b1a74 100644 --- a/tivo_commands.c +++ b/tivo_commands.c @@ -719,7 +719,6 @@ ProcessTiVoCommand(struct upnphttp * h, const char * orig_path) { strip_ext(anchorItem); } - free(path); if( command ) { @@ -742,9 +741,11 @@ ProcessTiVoCommand(struct upnphttp * h, const char * orig_path) { DPRINTF(E_DEBUG, L_GENERAL, "Unhandled command [%s]\n", command); Send501(h); + free(path); return; } } + free(path); CloseSocket_upnphttp(h); } #endif // TIVO_SUPPORT