Prevent possible NULL pointer dereference
Not sure if this will fix the crash for Henrik, but it's worth a try. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
13dbbd3085
commit
076d8966f0
@ -498,9 +498,9 @@ static void dc_match_serial(void *_dc, const char *model, uint32_t deviceid, con
|
||||
|
||||
if (!deviceid)
|
||||
return;
|
||||
if (!model || strcasecmp(dc->model, model))
|
||||
if (!dc->model && (!model || strcasecmp(dc->model, model)))
|
||||
return;
|
||||
if (!serial || strcasecmp(dc->serial, serial))
|
||||
if (!dc->serial || !serial || strcasecmp(dc->serial, serial))
|
||||
return;
|
||||
dc->deviceid = deviceid;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user