diff options
author | Keith Packard <keithp@guitar.keithp.com> | 2007-03-15 20:26:07 -0700 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-03-17 23:38:28 -0700 |
commit | 2489dae9f7def788910eee5733931392df83a0d6 (patch) | |
tree | 685d1ec9986030c16ce3afb593cc0774ed1f7def /randr/rrcrtc.c | |
parent | 9d0c3b52f25df89738fb1a62ccffda8c8cbb4689 (diff) |
Correct ref counting of RRMode structures
RRModes are referenced by the resource db, RROutput and RRCrtc structures.
Ensure that the mode reference count is decremented each time a reference is
lost from one of these sources. The missing destroys were in
RRCrtcDestroyResource and RROutputDestroyResource, which only happen at
server reset time, so modes would be unavailable in subsequent server
generations.
Diffstat (limited to 'randr/rrcrtc.c')
-rw-r--r-- | randr/rrcrtc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 315dd6c08..ecf5bb251 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -361,6 +361,8 @@ RRCrtcDestroyResource (pointer value, XID pid) } if (crtc->gammaRed) xfree (crtc->gammaRed); + if (crtc->mode) + RRModeDestroy (crtc->mode); xfree (crtc); return 1; } |