From nobody Thu May 16 17:22:44 2024 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 4VgH3T3pGhz5LZQT; Thu, 16 May 2024 17:22:45 +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 4VgH3T1Cmcz4PfT; Thu, 16 May 2024 17:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715880165; 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=/E5EqKMexsqipsAuOoJuYwHnVaRvMMcr8YtL2ai7AFQ=; b=WliUkYW6+peQeSfWTJAC1ATzicQFMeITFKpZznDCQ3QbieWuRshGV9ybTKnULZbR68sEHW Udtn2c9XjQtmTeyiUG3ZSjW85Ms5X5n2SO2FpqviSplcPRYPiN/HWkBJ3/uaRKboZs8zkq PVXlmdpMGB/gh3I6O1s2XMBxdDUZqbiBqEP14a+7X9CowOixlWiwh4mMUrpdZa9R5AIDNz 9DM8SXafypAcZCaOfH6SuqeNUE8s/0p8aC//t0ohno7zbPo2RJyF6WhKlBgRqmfbaCsc8U WSD5aMtOGzPHjPupsyyru4W/R6BQv3RG7Du9Ixr3v8lSn1N60b/nwQPgKwfsFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715880165; a=rsa-sha256; cv=none; b=G98l9GlojLsfkZhrlfJAd9Wmozl0soRohhIRq1WnkK0vXe42n+zbASNy2clyIjSUqb6zRj gBYF9dfn6QW5jAwlQiLXcEXygF5WKP/HgIJHNXASAofUEeVP6KNbMXI3yxFgQuAnOHYBjM 9KDLeKcmtSN2Xfc62R/aBO4nW1D8I3WBwAemOXnqerAnK1Ji3wupklvYARGPG3niKUUr1x jdUoqB1Ju2F9SzSvxQ3MokiSINMqB5u7rnCtEuD+V6VX2BcpWdlqCa0HcrSVVLl1jde/No +dMBgUln8z+JKMr2F+sL5O0JSqrigaAI1VAjMf4EzvaNmgaVilJ0FTQbGsn5mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715880165; 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=/E5EqKMexsqipsAuOoJuYwHnVaRvMMcr8YtL2ai7AFQ=; b=QqikvhQJ7nmEuD9EpqCFsRVKLoO8V/wkzJ5/jgjr+fg/N7ou7AWQkn+912DuEMTm7lihI4 2L0kFpO1kqTy8kWPKB/+m/E/vYAh+mqqOJcb6GaZMdaoCQNzXWX+XNDJyb6+USmOeCTvmi h7Ra1FXfIM58P+3AwCvUA6Afm6jSCzzntK6ITQACBrLbWwYHpCDgvhaIrccsfJpnMJisNz SRuw18M8BIox2o8dtWpCFffWUqxdydh87bLgrGkEHaHKFhuFZzsnZM6jvLPU//q4ZpMFFI RDqTs/hOvjh6+8C880t/vRESTcTnE0cEsE+JCyLzwPaC+veP2W2fdFVD3CA76w== 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 4VgH3T0pgZz177K; Thu, 16 May 2024 17:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44GHMieW052892; Thu, 16 May 2024 17:22:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44GHMi5w052889; Thu, 16 May 2024 17:22:44 GMT (envelope-from git) Date: Thu, 16 May 2024 17:22:44 GMT Message-Id: <202405161722.44GHMi5w052889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f38117359af1 - main - ctladm: fix resource leak 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f38117359af1f6b6cb373018084cad99b22dc178 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f38117359af1f6b6cb373018084cad99b22dc178 commit f38117359af1f6b6cb373018084cad99b22dc178 Author: Pierre Pronchery AuthorDate: 2024-05-15 18:13:52 +0000 Commit: Warner Losh CommitDate: 2024-05-16 17:22:48 +0000 ctladm: fix resource leak The str variable in cctl_nvlist_end_element() does not get free()'d when converted to an integer value. (name is "trtype") Reported by: Coverity Scan Coverity ID: 1545039 Sponsored by: The FreeBSD Foundation Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1237 --- usr.sbin/ctladm/ctladm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 0b034b21b2b1..688281238fb0 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -3920,7 +3920,6 @@ cctl_nvlist_end_element(void *user_data, const char *name) str = NULL; } else if (strcmp(name, "trtype") == 0) { cur_conn->trtype = atoi(str); - str = NULL; } else if (strcmp(name, "connection") == 0) { nvlist->cur_conn = NULL; } else if (strcmp(name, "ctlnvmflist") == 0) {