diff --git a/external/bsd/libevent/dist/event.c b/external/bsd/libevent/dist/event.c index ccb25c5e74eb..11623570fd47 100644 --- a/external/bsd/libevent/dist/event.c +++ b/external/bsd/libevent/dist/event.c @@ -1,4 +1,4 @@ -/* $NetBSD: event.c,v 1.5 2021/04/07 03:36:48 christos Exp $ */ +/* $NetBSD: event.c,v 1.6 2023/08/03 08:03:19 mrg Exp $ */ /* * Copyright (c) 2000-2007 Niels Provos @@ -28,7 +28,7 @@ */ #include "event2/event-config.h" #include -__RCSID("$NetBSD: event.c,v 1.5 2021/04/07 03:36:48 christos Exp $"); +__RCSID("$NetBSD: event.c,v 1.6 2023/08/03 08:03:19 mrg Exp $"); #include "evconfig-private.h" #ifdef _WIN32 @@ -1382,6 +1382,7 @@ event_signal_closure(struct event_base *base, struct event *ev) return; } } + ev->ev_pncalls = NULL; } /* Common timeouts are special timeouts that are handled as queues rather than diff --git a/usr.bin/rdist/expand.c b/usr.bin/rdist/expand.c index 0d244ebaec7f..e0cb82c682a6 100644 --- a/usr.bin/rdist/expand.c +++ b/usr.bin/rdist/expand.c @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.18 2009/07/14 21:05:34 apb Exp $ */ +/* $NetBSD: expand.c,v 1.19 2023/08/03 08:03:19 mrg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93"; #else -__RCSID("$NetBSD: expand.c,v 1.18 2009/07/14 21:05:34 apb Exp $"); +__RCSID("$NetBSD: expand.c,v 1.19 2023/08/03 08:03:19 mrg Exp $"); #endif #endif /* not lint */ @@ -141,6 +141,10 @@ expand(struct namelist *list, int wh) printf("expanded list = "); prnames(list); } + sortbase = NULL; + eargv = NULL; + path = tpathp = pathp = NULL; + lastpathp = NULL; return(list); } diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c index 6c0d2dc57d58..9cb8b95c8415 100644 --- a/usr.sbin/powerd/powerd.c +++ b/usr.sbin/powerd/powerd.c @@ -1,4 +1,4 @@ -/* $NetBSD: powerd.c,v 1.20 2020/10/12 16:54:43 roy Exp $ */ +/* $NetBSD: powerd.c,v 1.21 2023/08/03 08:03:19 mrg Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -189,6 +189,7 @@ run_script(const char *argv[]) if (access(path, R_OK|X_OK) == 0) { int status; pid_t pid; + const char *orig_argv0 = argv[0]; argv[0] = path; @@ -199,13 +200,16 @@ run_script(const char *argv[]) (void)fprintf(stderr, " %s", argv[j]); (void)fprintf(stderr, "\n"); } - if (no_scripts != 0) + if (no_scripts != 0) { + argv[0] = orig_argv0; return; + } switch ((pid = vfork())) { case -1: powerd_log(LOG_ERR, "fork to run script: %s", strerror(errno)); + argv[0] = orig_argv0; return; case 0: @@ -233,6 +237,7 @@ run_script(const char *argv[]) } break; } + argv[0] = orig_argv0; return; }