From nobody Fri Mar 24 07:08:50 2023 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 4PjYGV5lzZz41Bh9; Fri, 24 Mar 2023 07:08:50 +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 4PjYGV59dfz4FY6; Fri, 24 Mar 2023 07:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679641730; 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=rbYqZ7m2oKSkXG7ofHG7fc1xA/0nofR5bv5Ze1fQYjc=; b=WU4uI4t39UHjYB67RwrZFP7yE956k/XE1qkZ5hjYTyhItYHAkrPHZbGKk+sPL0I2KtB2Le 8CqNbOvgWb5k2i4vrsjXZ20g4+0ntlp3I+aH8+8dOlfTRi1fUbV968a4jX9rCU+nUbdvaM nDHh3+4d7ESy7/jTHgToxyr4zR3dW7VBHL052RC2Q1WZlRWe/i+XYU9SDTCpSDYRN/m5Ho KgzWYD61ggWFJIEd0smiTi6lI3NcAGJ+i+k2f6s71DwxAWPDTuBkJiJNeHfAFQZNMXdlgi OHnzsMSmA3sHwSh0bPX1BaV8xNXTwOc6v2iHcEbHatcOM7gIcy9+SjmfyZ5eVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679641730; 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=rbYqZ7m2oKSkXG7ofHG7fc1xA/0nofR5bv5Ze1fQYjc=; b=AYEk8rVOeN+R0hM3mrunFJpz98HaktJs2IrzwKHWksIFQvJrSgMqtiNk9E0cxdYzUjq8J8 wilGvPP9/J5gOysMc4K+ElIlcXJvm0c6geMlGsGi0pzH+1kyVkLnGJblUkvb6tBY2PaICs Z11jLO3JDy4r06RHNR2SYF5UVkm2WX4MkTSffs1PhapURwdduj+8dBMQ0G0tZrDlZx+iGZ Kl99sq/48Dc5osKaUFgSCQqu/FORO33CshRGFNRnQgbhQFN/ZeR0aT+B5SnzMfZj0CEWKw 7w/GaP2CIUIr+n0GvpfNOBENvIDlfFWOBAsvG301z0WJP8B4kwocz+Qmyhgxxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679641730; a=rsa-sha256; cv=none; b=N5usVnwVu1stm6bClikQg6i9Yjt9on/3tSrRg8xpAhiwI6vQ8wdHYQdfJ2NsuQZJWhHl1c MUIg1B3f4d0tyKdpiFp1sgGSDC68cd+RTWdqiOk0PNBn4AO6yhNKwH8m2UofeTfk+3qh4m dRj/djq/jN1ImjCouS0Ii3qtWSDBVXFgiOQEbQvFQUCdMYyaSk0dXgTMYljyfU577Uly5X eNrFH8Qo7cXQ9zF0LQjAg2T0iAx39sFUr1QY83TZeEKwayU8wMfGq9cCixKCzHBmNCFBf+ VHFTs62rGkNRJV+mwB61zRdXXmd5eGj3JakbeKKkoXCpYF04F4nJ7xMPDl6yrg== 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 4PjYGV463Jz17Rb; Fri, 24 Mar 2023 07:08:50 +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 32O78oWb023724; Fri, 24 Mar 2023 07:08:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32O78oZb023723; Fri, 24 Mar 2023 07:08:50 GMT (envelope-from git) Date: Fri, 24 Mar 2023 07:08:50 GMT Message-Id: <202303240708.32O78oZb023723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0ab2c922340b - main - ifconfig: free memory allocated by getaddrinfo() 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ab2c922340b8848c79301fdd84548417c0c3023 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0ab2c922340b8848c79301fdd84548417c0c3023 commit 0ab2c922340b8848c79301fdd84548417c0c3023 Author: Kristof Provost AuthorDate: 2023-03-24 05:25:28 +0000 Commit: Kristof Provost CommitDate: 2023-03-24 07:08:19 +0000 ifconfig: free memory allocated by getaddrinfo() Reported by: emaste, Coverity Sponsored by: Rubicon Communications, LLC (Netgate) --- sbin/ifconfig/carp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c index 0dc3facdaf79..126a15a230df 100644 --- a/sbin/ifconfig/carp.c +++ b/sbin/ifconfig/carp.c @@ -242,6 +242,7 @@ setcarp_peer6(const char *val, int d, int s, const struct afswtch *afp) memcpy(&carp_addr6, &((struct sockaddr_in6 *)res->ai_addr)->sin6_addr, sizeof(carp_addr6)); + freeaddrinfo(res); } static void