mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-24 04:48:51 +00:00
trivial: Make fu_dell_detect_dock() slightly more NULL-deref safe
This commit is contained in:
parent
11ca8122c3
commit
061ad8c5e8
@ -159,9 +159,10 @@ fu_dell_detect_dock (FuDellSmiObj *smi_obj, guint32 *location)
|
|||||||
g_debug ("no dock plugged in");
|
g_debug ("no dock plugged in");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*location = count_out->location;
|
|
||||||
g_debug ("Dock count %u, location %u.",
|
g_debug ("Dock count %u, location %u.",
|
||||||
count_out->count, *location);
|
count_out->count, count_out->location);
|
||||||
|
if (location != NULL)
|
||||||
|
*location = count_out->location;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user