upstream: Free the previously allocated msg buffer after writing it

out. OK djm@

OpenBSD-Commit-ID: 18c055870fc75e4cb9f926c86c7543e2e21d7fa4
This commit is contained in:
claudio@openbsd.org 2020-11-10 07:46:20 +00:00 committed by Damien Miller
parent fcf429a4c6
commit 4340dd4392
1 changed files with 2 additions and 1 deletions

View 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. * 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); xvasprintf(&msg, fmt, args);
va_end(args); va_end(args);
writemsg(msg); writemsg(msg);
free(msg);
} }
if (ctx == NULL || ctx->pid <= 0) { if (ctx == NULL || ctx->pid <= 0) {