lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71dd9aec-e2b4-4323-aeb6-53f2491005b3@linaro.org>
Date: Thu, 28 Nov 2024 12:54:16 +0000
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Vladimir Zapolskiy <vladimir.zapolskiy@...aro.org>,
 Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
 Vikash Garodia <quic_vgarodia@...cinc.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Cc: quic_renjiang@...cinc.com, quic_vnagar@...cinc.com,
 quic_dikshita@...cinc.com, konradybcio@...nel.org,
 linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 Stanimir Varbanov <stanimir.varbanov@...aro.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 1/3] media: venus: Add support for static video
 encoder/decoder declarations

On 28/11/2024 09:02, Vladimir Zapolskiy wrote:
>> +    np = of_changeset_create_node(ocs, dev->of_node, node_name);
>> +    if (!np) {
>> +        dev_err(dev, "Unable to create new node\n");
>> +        return -ENODEV;
> 
> Leaked reference to np.

I don't believe that's a leak, because you only release np when it is 
non-NULL.

>> +    }
>> +
>> +    ret = of_changeset_add_prop_string(ocs, np, "compatible", compat);
>> +    if (ret)
>> +        dev_err(dev, "unable to add %s\n", compat);
>> +
>> +    of_node_put(np); 

Which we do here.

However, I think I have missed a of_changeset_destroy(ocs); on the error 
path.

@ref drivers/pci/of.c::of_pci_make_dev_node()

---
bod


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ