Coverity #826: Fix potential memory leak.

This commit is contained in:
Daniel Stone 2006-04-10 08:50:33 +00:00
parent 1357af2474
commit c9f6e60d42
2 changed files with 7 additions and 1 deletions

View File

@ -50,6 +50,9 @@ Fri Apr 7 13:46:45 2006 Søren Sandmann <sandmann@redhat.com>
* xkb/xkb.c: * xkb/xkb.c:
Coverity #844, #845, #846: Fix memory leaks. Coverity #844, #845, #846: Fix memory leaks.
* xkb/XKBMisc.c:
Coverity #826: Fix potential memory leak.
2006-04-06 Keith Packard <keithp@keithp.com> 2006-04-06 Keith Packard <keithp@keithp.com>
* fb/fbstipple.c: (fbEvenStipple): * fb/fbstipple.c: (fbEvenStipple):

View File

@ -466,8 +466,11 @@ unsigned changed,tmp;
unsigned int new_vmodmask; unsigned int new_vmodmask;
changed|= XkbKeyActionsMask; changed|= XkbKeyActionsMask;
pActs= XkbResizeKeyActions(xkb,key,nSyms); pActs= XkbResizeKeyActions(xkb,key,nSyms);
if (!pActs) if (!pActs) {
if (nSyms > IBUF_SIZE)
xfree(interps);
return False; return False;
}
new_vmodmask= 0; new_vmodmask= 0;
for (n=0;n<nSyms;n++) { for (n=0;n<nSyms;n++) {
if (interps[n]) { if (interps[n]) {