Bug 21974

Summary: XrmSetDatabase should reset XlibDisplayDfltRMDB unconditionally
Product: xorg Reporter: YAMAMOTO Mitsuharu <mituharu>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:

Description YAMAMOTO Mitsuharu 2009-05-27 18:08:39 UTC
IIUC, calling XrmSetDatabase(display, database) means the `database' is owned by the caller and it's responsible for freeing the newly associated database when it becomes no longer necessary.
Then, I think XrmSetDatabase should reset the XlibDisplayDfltRMDB flag even if display->db is previously set to NULL so it may not be destroyed by the next XrmSetDatabase or XCloseDisplay call.
A concrete problem in an application can be found at http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-05/msg00633.html .
Comment 1 Adam Jackson 2018-06-12 19:09:00 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.