Update XKBMAlloc.c to Solve CodeQL Alert Potential use after double free

Solves CodeQL alert in a single line.
This commit is contained in:
Collin 2025-06-26 21:39:41 -05:00 committed by GitHub
parent 3e1c2d5456
commit 436ac53c42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -777,7 +777,7 @@ XkbResizeKeyActions(XkbDescPtr xkb, int key, int needed)
free(xkb->server->acts);
xkb->server->acts = newActs;
xkb->server->num_acts = nActs;
return &xkb->server->acts[xkb->server->key_acts[key]];
return &newActs[xkb->server->key_acts[key]];
}
void