From nobody Tue Nov 22 10:42:57 2022 X-Original-To: dev-commits-ports-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 4NGgnt1g5qz4jXd9; Tue, 22 Nov 2022 10:42:58 +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 4NGgnt19Rmz3vfm; Tue, 22 Nov 2022 10:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669113778; 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=hVMhTtrFE1oExgR3JeK+qGXaU2TIHm9UxyAWBffhPc0=; b=r6a+bbaK2Wh4cmKfwCZw4Q4e0Bln/4igxLJ5b9HbJU2jm2rbplGLFiUagb+Mt+p7BhLXzO jIGTh3rWLKUUisQdkFpt4Lx+G2Dkl864MFr+RpgjTEA2nj/e1C8J1m03aSN9fDW0L50n7f G2eyzEU9+fmPFtzteqH5OlpXRrludtIZ0ndyUYnNgqWk36/geNxPzOd0Fm5WpkKMwoOorf uGVuoPFM199i3C4gTplc4JzNrGTAMHo7LKuN7KAQkndd12MAJCieXqfu5JRM+oVAXYmFW6 CVLETyaSo3A9yb2H1LNYXPqM+IAa5p3tBh3zfQfOPRO6jSF4ZW2tau/XlVKToQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669113778; 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=hVMhTtrFE1oExgR3JeK+qGXaU2TIHm9UxyAWBffhPc0=; b=AQC/pH1Mj9+60Uh2919tkoLZ40O7KuzsDD6rhR8dNJnBipoPtUNskz/KCbS+uZ8qvBXOnX FdvTGiD1oCS9jZ/NWoy2eDYjngv3cNbS/pyxIzD9dAcHHQGbyzpfT1vHzr0vZzfcMD3+cP LYtTFMIfFkdifEQz1ma+te3rLQCAUo3wPOkcXQfY7R30miCIdoBmy/X+a5X8l+8Gs/Kd8S jJCZwKe9/7X2NWexgf0w3OsOGQiM/mG77SBMmFHu8sqf+HoFhDTAOca3qEYnbsgKhZj6/N YeB6vhs6IgxjyyeCRBfC2t9H9h3eTyKLe5E/ejcQdvupspJAO0jdbkDdrDDj+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669113778; a=rsa-sha256; cv=none; b=OOKGzFZlYIfKD7LDJS2Uxp5BUtucoiI2Y+73NgtzAthGG7DyXXZxLn1ErCOMOMteNPYURe mq9ZRtBEdVft74fyqv7v5bpgA0mQJ+mnwuB2mUxXHrCPCRlYIRCsnLBiclSKhW0NkfbBB7 rtVrGFXhPh/fuU0lSXMUy/QwkXZPMYenYWLm1AOtVMGqipfBEvoXYKU/DRI37eTgOwGrAM GZwlngwPfB2VPjE2Fhypv1/eBF0Bv+/MGOdCzMMtSAHC1Gjqj6B4QsxbBNmSbQHZt63qCK mpL119gPfeqe+qeAp0DQKNcGRunOlDF8aPoQLT+XNi5x65i/o6OhqZhwCFyg1A== 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 4NGgnt0HLrzgHM; Tue, 22 Nov 2022 10:42:58 +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 2AMAgvd8057337; Tue, 22 Nov 2022 10:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AMAgvBI057336; Tue, 22 Nov 2022 10:42:57 GMT (envelope-from git) Date: Tue, 22 Nov 2022 10:42:57 GMT Message-Id: <202211221042.2AMAgvBI057336@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 857cdddb3c61 - main - sysutils/gdisk: actually commit the right patch to fix memory issue List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 857cdddb3c61a83073570e5ed984bba1a1e1fbf7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=857cdddb3c61a83073570e5ed984bba1a1e1fbf7 commit 857cdddb3c61a83073570e5ed984bba1a1e1fbf7 Author: Baptiste Daroussin AuthorDate: 2022-11-22 10:42:22 +0000 Commit: Baptiste Daroussin CommitDate: 2022-11-22 10:42:22 +0000 sysutils/gdisk: actually commit the right patch to fix memory issue --- sysutils/gdisk/files/patch-gptcl.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sysutils/gdisk/files/patch-gptcl.cc b/sysutils/gdisk/files/patch-gptcl.cc index 19e73564d9d0..4b89d9c51625 100644 --- a/sysutils/gdisk/files/patch-gptcl.cc +++ b/sysutils/gdisk/files/patch-gptcl.cc @@ -1,4 +1,4 @@ ---- gptcl.cc.orig 2022-11-22 09:31:13 UTC +--- gptcl.cc.orig 2022-04-14 23:17:12 UTC +++ gptcl.cc @@ -71,7 +71,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { uint64_t low, high, startSector, endSector, sSize, mainTableLBA; @@ -9,7 +9,7 @@ PartType typeHelper; struct poptOption theOptions[] = -@@ -156,9 +156,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { +@@ -156,12 +156,14 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { // Assume first non-option argument is the device filename.... device = (char*) poptGetArg(poptCon); @@ -18,10 +18,14 @@ poptResetContext(poptCon); - if (device != NULL) { -+ if (devstr.empty()) { ++ if (!devstr.empty()) { JustLooking(); // reset as necessary BeQuiet(); // Tell called functions to be less verbose & interactive - if (LoadPartitions(devstr)) { +- if (LoadPartitions((string) device)) { ++ if (LoadPartitions(devstr)) { + if ((WhichWasUsed() == use_mbr) || (WhichWasUsed() == use_bsd)) + saveNonGPT = 0; // flag so we don't overwrite unless directed to do so + sSize = GetBlockSize(); @@ -498,7 +500,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { cerr << "Error encountered; not saving changes.\n"; retval = 4;