Free temp_pagelist on error. Free in reverse order. Noticed by open.
Signed-off-by: Robert Noland <rnoland@2hip.net>main
parent
9ad5a6d0d7
commit
be5fad45ee
|
@ -562,8 +562,9 @@ static int drm_do_addbufs_pci(struct drm_device *dev, struct drm_buf_desc *reque
|
|||
|
||||
if (entry->buflist == NULL || entry->seglist == NULL ||
|
||||
temp_pagelist == NULL) {
|
||||
free(entry->buflist, M_DRM);
|
||||
free(temp_pagelist, M_DRM);
|
||||
free(entry->seglist, M_DRM);
|
||||
free(entry->buflist, M_DRM);
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue