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.
This commit is contained in:
Daniel Stone 2008-01-05 10:43:53 +02:00
parent b99a43dfe9
commit 0137b0394a

View File

@ -1793,6 +1793,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,