mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 03:30:22 +01:00
xf86drm: Handle NULL in drmCopyVersion
Just as it is already handled in the caller, `drmGetVersion`. I'm not sure what the offending driver is, but the Ubuntu incidents seem to be coming from a dual Intel/Nvidia machine. And they show it is `card1` so I'm guessing `nvidia-drm` is the offender. Related: https://bugs.launchpad.net/bugs/2104352
This commit is contained in:
parent
a7eb2cfd53
commit
d387ec976f
1 changed files with 3 additions and 3 deletions
|
|
@ -1348,11 +1348,11 @@ static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s)
|
|||
d->version_minor = s->version_minor;
|
||||
d->version_patchlevel = s->version_patchlevel;
|
||||
d->name_len = s->name_len;
|
||||
d->name = strdup(s->name);
|
||||
d->name = s->name ? strdup(s->name) : NULL;
|
||||
d->date_len = s->date_len;
|
||||
d->date = strdup(s->date);
|
||||
d->date = s->date ? strdup(s->date) : NULL;
|
||||
d->desc_len = s->desc_len;
|
||||
d->desc = strdup(s->desc);
|
||||
d->desc = s->desc ? strdup(s->desc) : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue