From ca3559886d0554e8ef084283913a507af4f155f1 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 22 Jul 2022 05:55:05 +0000 Subject: [PATCH] avoid use after free ok deraadt@ --- lib/libc/yp/yp_bind.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/yp/yp_bind.c b/lib/libc/yp/yp_bind.c index 7889e8451ef..15db9ea7730 100644 --- a/lib/libc/yp/yp_bind.c +++ b/lib/libc/yp/yp_bind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yp_bind.c,v 1.30 2022/07/18 02:32:11 deraadt Exp $ */ +/* $OpenBSD: yp_bind.c,v 1.31 2022/07/22 05:55:05 jsg Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt * All rights reserved. @@ -81,6 +81,7 @@ again: if (ypbinding->dom_client == NULL) { close(ypbinding->dom_socket); free(ypbinding); + ypbinding = NULL; clnt_pcreateerror("clntudp_create"); goto again; } -- 2.20.1