XKB: XkbCopyKeymap: Don't leak all the sections

Previously, we'd just keep num_sections at 0, which would break the
geometry and lead us to leak sections.  Don't do that.
(cherry picked from commit 0137b0394a)
This commit is contained in:
Daniel Stone 2008-01-05 10:43:53 +02:00
parent 02e805f0ff
commit 8a3acd3ec4

View File

@ -1770,6 +1770,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
if (!tmp)
return FALSE;
dst->geom->sections = tmp;
dst->geom->num_sections = src->geom->num_sections;
for (i = 0,
ssection = src->geom->sections,