From adfc59f8f04d83123795ce39731cc05a78b7b78d Mon Sep 17 00:00:00 2001 From: Ewald Snel Date: Sat, 21 Dec 2002 13:45:56 +0000 Subject: Fix memory leaks CVS patchset: 3604 CVS date: 2002/12/21 13:45:56 --- src/input/input_net.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/input/input_net.c') diff --git a/src/input/input_net.c b/src/input/input_net.c index 0903e2a98..e4e9bee0f 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -20,7 +20,7 @@ * Read from a tcp network stream over a lan (put a tweaked mp1e encoder the * other end and you can watch tv anywhere in the house ..) * - * $Id: input_net.c,v 1.39 2002/12/21 12:56:47 miguelfreitas Exp $ + * $Id: input_net.c,v 1.40 2002/12/21 13:45:57 esnel Exp $ * * how to set up mp1e for use with this plugin: * @@ -328,12 +328,17 @@ static input_plugin_t *net_plugin_open (input_class_t *cls_gen, xine_stream_t *s if (!strncasecmp (mrl, "tcp://", 6)) { filename = (char *) &this->mrl[6]; - if((!filename) || (strlen(filename) == 0)) + if((!filename) || (strlen(filename) == 0)) { + free (this->mrl); + free (this); return NULL; + } - } - else + } else { + free (this->mrl); + free (this); return NULL; + } pptr=strrchr(filename, ':'); if(pptr) { @@ -345,6 +350,8 @@ static input_plugin_t *net_plugin_open (input_class_t *cls_gen, xine_stream_t *s this->curpos = 0; if (this->fh == -1) { + free (this->mrl); + free (this); return NULL; } -- cgit v1.2.3