diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2019-09-13 04:36:43 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-09-13 14:53:45 +1000 |
commit | b36ee3fcb2f1601693b1b7fd60dd6bd96006ea75 (patch) | |
tree | a3306118a58e6d505af368300e93a18848ca428c /auth-options.c | |
parent | 2aefdf1aef906cf7548a2e5927d35aacb55948d4 (diff) | |
download | openssh-git-b36ee3fcb2f1601693b1b7fd60dd6bd96006ea75.tar.gz |
upstream: Plug mem leaks on error paths, based in part on github
pr#120 from David Carlier. ok djm@.
OpenBSD-Commit-ID: c57adeb1022a8148fc86e5a88837b3b156dbdb7e
Diffstat (limited to 'auth-options.c')
-rw-r--r-- | auth-options.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/auth-options.c b/auth-options.c index 6fb59dc7..9550f656 100644 --- a/auth-options.c +++ b/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> * @@ -266,6 +266,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; } |