Free temp_pagelist on error. Free in reverse order. Noticed by open.

Signed-off-by: Robert Noland <rnoland@2hip.net>
main
vehemens 2008-09-06 18:02:31 -07:00 committed by Robert Noland
parent 9ad5a6d0d7
commit be5fad45ee
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}