mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
fastboot: Check validity of dev_path
In some occations dev_path is not valid and we therefor can't dereference it. Check for this and ignore any events without a dev_path. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
@@ -240,7 +240,7 @@ static int handle_udev_event(int fd, void *data)
|
||||
// pid = udev_device_get_sysattr_value(dev, "idProduct");
|
||||
serial = udev_device_get_sysattr_value(dev, "serial");
|
||||
|
||||
if (!action)
|
||||
if (!action || !dev_path)
|
||||
goto unref_dev;
|
||||
|
||||
if (!strcmp(action, "add")) {
|
||||
|
||||
Reference in New Issue
Block a user