From: Karel Zak Date: Wed, 2 Jul 2025 10:25:45 +0000 (+0200) Subject: lib/path: avoid double free() for cpusets X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Futil-linux.git lib/path: avoid double free() for cpusets Addresses: https://github.com/util-linux/util-linux/issues/3641 Signed-off-by: Karel Zak --- diff --git a/lib/path.c b/lib/path.c index 48324d6dc..a828aea49 100644 --- a/lib/path.c +++ b/lib/path.c @@ -1057,8 +1057,10 @@ static int ul_path_cpuparse(struct path_cxt *pc, cpu_set_t **set, int maxcpus, i rc = 0; out: - if (rc) + if (rc) { cpuset_free(*set); + *set = NULL; + } free(buf); return rc; }