From nobody Mon Dec 05 00:32:19 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NQPdJ11lkz4k2N5; Mon, 5 Dec 2022 00:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NQPdH6DqVz3CJ3; Mon, 5 Dec 2022 00:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670200339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWNHNlhEqvTOzfWGaisZ3oIi1h5UzIQfF4TIGwWE2NI=; b=i4E3Ref3QH9dfegkcxSoM0njQQXZLSJ8cUIjOAEzUL9faSZrw0rj1sREJteVapbj1vvIcr 1KABDweSmKHQRn7gyi+qCFi56VRoamX8RIir/9e3RUTFg2SONNonlFYzwzDHE+zj4scWZF AbUssPSBXPvG3EjGcfqQS8vVXX3VGmD0calL49Eh6tcVtCW//aNd7Ei2AfqDHEb/vx+JEx MpshrZ87k2WHIpdhNTqXtOQz5an1IZAJ8e8hqR1+ZvD5Kyzy+ORaaeNBLvN89o9xeTp39A eOTfvsR6PNjQ7j4zVlIN09SaOdUPmcX21/JuGQYeMbc3hUI0Ltlc4PACZYMxdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670200339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWNHNlhEqvTOzfWGaisZ3oIi1h5UzIQfF4TIGwWE2NI=; b=phD/PHgQxkuzPyY6TuKbtcjmymgH65+Yh1K8/z9D9RUMZd8uKd5c6aPWX4cohxbiX61SNU RHPKZ3H1t2mB3lrBhV7g62OKEhjN76LSm0diUcuubg49vSnGefsvGHc7ivCuVhiLkwoqwz chlRBpFzZP9IqmIYaPYE3pLfbJlTntoepINbxYXeCQJjEQ9W9sftIls8zSk3e8/oY5fWO+ ockMS0sbmR5+Pxhfc+rd+AEiKpig7mSwu7zurb6tG8x98TIM5OdVlD8GRZp7IPRbr0+4g+ qlrujuGr0y28NIF9LWTnFRvhtZ+uvzHWF8Xx4itsjuvfWKTVGt2pl9d5KrIHJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670200339; a=rsa-sha256; cv=none; b=YiT23JNfxVnPbInsQRBsptCegs+xmBgj+5RSVIoQLoThGQs4u0QQez8lRYss2gToapUBK7 6AatgIeIWxnfSbpil4kvceEQx3f13Y3ndo/qq2wjMQl2YVMTNsJvN8dPf9Na6xokcK+SFl nyn6JdpsqbBblFfs+zgvUoYtjlehxPefeFXe7cXnK9yXKUc1QzzVmqljLHiZMrXprW4oI+ S2h4ivfOyGfPXI9xFQljfNdfwaiYQnLh6BYd5YzDemhv/HMKv0aqBrCWQtyd2y17avqaZT LMUI9SKuhsG6RQDAC+Jbs+Fk4/4+vwJedyV9wWhIscx6hiG+qhYYtSoWubmMmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NQPdH4y9zzdrT; Mon, 5 Dec 2022 00:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2B50WJTS074303; Mon, 5 Dec 2022 00:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B50WJW3074302; Mon, 5 Dec 2022 00:32:19 GMT (envelope-from git) Date: Mon, 5 Dec 2022 00:32:19 GMT Message-Id: <202212050032.2B50WJW3074302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f0b58b190107 - main - rpcgen: Don't free() a pointer after realloc(). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0b58b190107416e813c5db875034c6cfcede523 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f0b58b190107416e813c5db875034c6cfcede523 commit f0b58b190107416e813c5db875034c6cfcede523 Author: John Baldwin AuthorDate: 2022-12-05 00:31:35 +0000 Commit: John Baldwin CommitDate: 2022-12-05 00:31:35 +0000 rpcgen: Don't free() a pointer after realloc(). A successful realloc() already frees the old pointer. Reported by: GCC -Wuse-after-free Reviewed by: brooks, imp, emaste Differential Revision: https://reviews.freebsd.org/D37540 --- usr.bin/rpcgen/rpc_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 698017c969f2..1a2cae928472 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -925,7 +925,6 @@ moreargs(void) warnx("unable to allocate arglist"); crash(); } - free(arglist); arglist = newarglist; }