summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvehemens <vehemens@verizon.net>2008-09-06 18:02:31 -0700
committerRobert Noland <rnoland@2hip.net>2008-09-06 21:07:46 -0400
commitbe5fad45ee4e81997784f258fcdfaf0a303dd666 (patch)
tree0a856af259c4e4cd159db2d4c6a8d0a177d22af9
parent9ad5a6d0d73ba58ec7c2f66d0c5355185f2f68c6 (diff)
Free temp_pagelist on error. Free in reverse order. Noticed by open.
Signed-off-by: Robert Noland <rnoland@2hip.net>
-rw-r--r--bsd-core/drm_bufs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c
index 2570641d..6b31ad65 100644
--- a/bsd-core/drm_bufs.c
+++ b/bsd-core/drm_bufs.c
@@ -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;
}