modesetting: fix use after free.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
f073b5e582
commit
795af9ff01
|
@ -778,11 +778,11 @@ drmmode_output_destroy(xf86OutputPtr output)
|
|||
drmModeFreeProperty(drmmode_output->props[i].mode_prop);
|
||||
free(drmmode_output->props[i].atoms);
|
||||
}
|
||||
free(drmmode_output->props);
|
||||
for (i = 0; i < drmmode_output->mode_output->count_encoders; i++) {
|
||||
drmModeFreeEncoder(drmmode_output->mode_encoders[i]);
|
||||
free(drmmode_output->mode_encoders);
|
||||
}
|
||||
free(drmmode_output->props);
|
||||
free(drmmode_output->mode_encoders);
|
||||
drmModeFreeConnector(drmmode_output->mode_output);
|
||||
free(drmmode_output);
|
||||
output->driver_private = NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user