diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2019-09-13 04:36:44 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2019-09-13 04:36:44 +0000 |
commit | 49bf96bc337df4ed7f92e5eb5d521d791e4faa45 (patch) | |
tree | b0a674bb8076240715f741b38447d78a54933ed0 /usr.bin/ssh/auth-options.c | |
parent | 672b1792e0b6b327c42e56eedadd53df3fcd899f (diff) |
Plug mem leaks on error paths, based in part on github pr#120 from
David Carlier. ok djm@.
Diffstat (limited to 'usr.bin/ssh/auth-options.c')
-rw-r--r-- | usr.bin/ssh/auth-options.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/auth-options.c b/usr.bin/ssh/auth-options.c index 2aa48074ebf..8de5e2ec0cf 100644 --- a/usr.bin/ssh/auth-options.c +++ b/usr.bin/ssh/auth-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.88 2019/09/06 04:53:27 djm Exp $ */ +/* $OpenBSD: auth-options.c,v 1.89 2019/09/13 04:36:43 dtucker Exp $ */ /* * Copyright (c) 2018 Damien Miller <djm@mindrot.org> * @@ -262,6 +262,7 @@ handle_permit(const char **optsp, int allow_bare_port, * listen_host wildcard. */ if (asprintf(&tmp, "*:%s", opt) == -1) { + free(opt); *errstrp = "memory allocation failed"; return -1; } |