mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-25 16:19:02 +01:00
Memory leaks.
This commit is contained in:
parent
403b1b27ab
commit
5942e22d71
4
arg.c
4
arg.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: arg.c,v 1.3 2008-06-18 22:21:51 nicm Exp $ */
|
/* $Id: arg.c,v 1.4 2008-07-23 22:18:06 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -115,6 +115,8 @@ arg_parse_session(const char *arg)
|
|||||||
xfree(arg2);
|
xfree(arg2);
|
||||||
return (c->session);
|
return (c->session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xfree(arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tty-keys.c,v 1.5 2008-06-25 07:30:08 nicm Exp $ */
|
/* $Id: tty-keys.c,v 1.6 2008-07-23 22:18:06 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -253,9 +253,11 @@ tty_keys_find(struct tty *tty, char *buf, size_t len, size_t *size)
|
|||||||
|
|
||||||
tl.string = s;
|
tl.string = s;
|
||||||
tk = RB_FIND(tty_keys, &tty->ktree, &tl);
|
tk = RB_FIND(tty_keys, &tty->ktree, &tl);
|
||||||
if (tk != NULL)
|
if (tk != NULL) {
|
||||||
|
xfree(s);
|
||||||
return (tk);
|
return (tk);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xfree(s);
|
xfree(s);
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user