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-next>] [day] [month] [year] [list]
Message-ID: <20080128221300.GH8767@does.not.exist>
Date:	Tue, 29 Jan 2008 00:13:00 +0200
From:	Adrian Bunk <bunk@...nel.org>
To:	Tobias Lorenz <tobias.lorenz@....net>, mchehab@...radead.org
Cc:	v4l-dvb-maintainer@...uxtv.org, linux-kernel@...r.kernel.org
Subject: media/radio/radio-si470x.c: check-after-use

The Coverity checker spotted the following check-after-use in 
drivers/media/radio/radio-si470x.c:

<--  snip  -->

...
static void si470x_usb_driver_disconnect(struct usb_interface *intf)
{
        struct si470x_device *radio = usb_get_intfdata(intf);

        del_timer_sync(&radio->timer);    <------------------
        flush_scheduled_work();

        usb_set_intfdata(intf, NULL);
        if (radio) {                      <------------------
                video_unregister_device(radio->videodev);
                kfree(radio->buffer);
                kfree(radio);
        }
}
...

<--  snip  -->

Either "radio" can be NULL and this case has to be properly handled or 
the NULL check is not required.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ