projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0acbe4
)
[FreeBSD] Fix long standing memory leak in drm_remove_magic.
author
Robert Noland
<rnoland@2hip.net>
Sat, 23 Aug 2008 01:34:25 +0000
(21:34 -0400)
committer
Robert Noland
<rnoland@2hip.net>
Sun, 24 Aug 2008 19:25:20 +0000
(15:25 -0400)
We shuffled all the links around to disconnect the entry, but
never free it. We would incorrectly free the last entry in the
hash chain if nothing matched.
bsd-core/drm_auth.c
patch
|
blob
|
history
diff --git
a/bsd-core/drm_auth.c
b/bsd-core/drm_auth.c
index
f3aafe4
..
60af16c
100644
(file)
--- a/
bsd-core/drm_auth.c
+++ b/
bsd-core/drm_auth.c
@@
-117,11
+117,11
@@
static int drm_remove_magic(struct drm_device *dev, drm_magic_t magic)
if (prev) {
prev->next = pt->next;
}
+ free(pt, M_DRM);
return 0;
}
}
- free(pt, M_DRM);
return EINVAL;
}