Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core Des...



details:   https://anonhg.NetBSD.org/src/rev/9c2e6b5c6edf
branches:  trunk
changeset: 814870:9c2e6b5c6edf
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Apr 13 07:52:47 2016 +0000

description:
Destroy the lock before caller frees memory.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/namedb.h |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 444d96cd82c9 -r 9c2e6b5c6edf sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/namedb.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/namedb.h Wed Apr 13 01:41:18 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/namedb.h Wed Apr 13 07:52:47 2016 +0000
@@ -28,8 +28,11 @@
        nouveau_parent_init(&(p)->base)
 #define nouveau_namedb_fini(p,s)                                               \
        nouveau_parent_fini(&(p)->base, (s))
-#define nouveau_namedb_destroy(p)                                              \
-       nouveau_parent_destroy(&(p)->base)
+#define nouveau_namedb_destroy(p) do                                           \
+{                                                                              \
+       rwlock_destroy(&(p)->lock);                                            \
+       nouveau_parent_destroy(&(p)->base);                                    \
+} while (0)
 
 int  nouveau_namedb_create_(struct nouveau_object *, struct nouveau_object *,
                            struct nouveau_oclass *, u32 pclass,



Home | Main Index | Thread Index | Old Index