Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/x11/x.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,13 @@ static void XRM_update_db(void)
XrmDestroyDatabase(db);
}

// Despite what the XrmSetDatabase docs say, it may try to free
// the database, resulting in memory corruption. Prevent that
// by making sure it has no db to act on. If it's past the
// first run, we will have done XrmDestroyDatabase above
// anyway.
xctx.dpy->db = NULL;

db = XrmGetStringDatabase((const char*)prop.value);
XrmSetDatabase(xctx.dpy, db);
}
Expand Down