From b36ee3fcb2f1601693b1b7fd60dd6bd96006ea75 Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Fri, 13 Sep 2019 04:36:43 +0000 Subject: upstream: Plug mem leaks on error paths, based in part on github pr#120 from David Carlier. ok djm@. OpenBSD-Commit-ID: c57adeb1022a8148fc86e5a88837b3b156dbdb7e --- auth-options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'auth-options.c') 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 * @@ -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; } -- cgit v1.2.3