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) |
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 6fb59dc7e..9550f656f 100644 --- a/auth-options.c +++ b/auth-options.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth-options.c,v 1.88 2019/09/06 04:53:27 djm Exp $ */ | 1 | /* $OpenBSD: auth-options.c,v 1.89 2019/09/13 04:36:43 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Damien Miller <djm@mindrot.org> | 3 | * Copyright (c) 2018 Damien Miller <djm@mindrot.org> |
4 | * | 4 | * |
@@ -266,6 +266,7 @@ handle_permit(const char **optsp, int allow_bare_port, | |||
266 | * listen_host wildcard. | 266 | * listen_host wildcard. |
267 | */ | 267 | */ |
268 | if (asprintf(&tmp, "*:%s", opt) == -1) { | 268 | if (asprintf(&tmp, "*:%s", opt) == -1) { |
269 | free(opt); | ||
269 | *errstrp = "memory allocation failed"; | 270 | *errstrp = "memory allocation failed"; |
270 | return -1; | 271 | return -1; |
271 | } | 272 | } |