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]
Date:   Thu, 4 Apr 2019 22:42:32 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Wen Yang <wen.yang99@....com.cn>, dri-devel@...ts.freedesktop.org,
        kernel-janitors@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        Tomi Valkeinen <tomi.valkeinen@...com>,
        Yi Wang <wang.yi59@....com.cn>
Subject: Re: [PATCH 4/7] drm/omap: fix possible object reference leak

> @@ -208,8 +208,10 @@  static int __init omapdss_boot_init(void)
>
>  	dss = of_find_matching_node(NULL, omapdss_of_match);
>
> -	if (dss == NULL || !of_device_is_available(dss))
> +	if (dss == NULL || !of_device_is_available(dss)) {
> +		of_node_put(dss);
>  		return 0;
> +	}

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c?id=61de49cb596710b918f7a80839f0b6de2017bc32#n203

Can it be nicer to add a jump target here?

+	if (!dss || !of_device_is_available(dss))
-		return 0;
+		goto put_node;


>
>  	omapdss_walk_device(dss, true);
>
> @@ -234,6 +236,7 @@  static int __init omapdss_boot_init(void)
>  		kfree(n);
>  	}
>

+put_node:

> +	of_node_put(dss);
>  	return 0;
>  }


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ