]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Free the previously allocated msg buffer after writing it
authorclaudio@openbsd.org <claudio@openbsd.org>
Tue, 10 Nov 2020 07:46:20 +0000 (07:46 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 11 Nov 2020 23:53:03 +0000 (10:53 +1100)
out. OK djm@

OpenBSD-Commit-ID: 18c055870fc75e4cb9f926c86c7543e2e21d7fa4

readpass.c

index 78bca832aec7a1eb0a7e79558cb24c8d84e42d6c..9c7476c13f2ab4c7aa42486e0ba546bf410c0905 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: readpass.c,v 1.67 2020/11/08 23:19:03 djm Exp $ */
+/* $OpenBSD: readpass.c,v 1.68 2020/11/10 07:46:20 claudio Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -312,6 +312,7 @@ notify_complete(struct notifier_ctx *ctx, const char *fmt, ...)
                xvasprintf(&msg, fmt, args);
                va_end(args);
                writemsg(msg);
+               free(msg);
        }
 
        if (ctx == NULL || ctx->pid <= 0) {