Skip to content
Snippets Groups Projects
Commit 2823a2c2 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Fixed memory leak in mux_close.

parent f862f212
No related branches found
No related tags found
No related merge requests found
/*
* $Id: mux.c,v 0.5 1991/09/15 10:30:47 linus Exp $
* $Id: mux.c,v 0.6 1991/09/21 12:13:08 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -26,7 +26,7 @@
** mux.c
*/
static char *rcsid = "$Id: mux.c,v 0.5 1991/09/15 10:30:47 linus Exp $";
static char *rcsid = "$Id: mux.c,v 0.6 1991/09/21 12:13:08 ceder Exp $";
#include <stddef.h>
......@@ -103,6 +103,7 @@ mux_destruct(Mux *mp)
mux_free_parsed(mp);
s_clear(&mp->parse.unparsed);
sfree(mp->client_v);
sfree(mp);
}
......@@ -409,6 +410,12 @@ mux_close(Connection * cp)
{
case MUX_TYPE_CLIENT:
isc_close(mp->scb);
if (mp->client_c != 1)
restart_kom("ERROR: mux_close(): client_c == %d\n", mp->client_c);
isc_freemsg(mp->client_v[0].outmsg);
mux_destruct(mp);
cp->mux = NULL;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment