mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01:00
dix: avoid memory leak in ProcListProperties()
Reported in #1817:
xwayland-24.1.6/redhat-linux-build/../dix/property.c:584:5:
warning[-Wanalyzer-malloc-leak]: leak of ‘pAtoms’
Can happen if, and only if, XaceHookPropertyAccess() blocks access
to all properties, so that numProps ends up zero on the second loop.
Fixes: 39f337fd4 ("dix: ProcListProperties: skip unneeded work if numProps is 0")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2078>
This commit is contained in:
parent
c9fa8a8da1
commit
ed92eae84d
1 changed files with 1 additions and 1 deletions
|
|
@ -618,8 +618,8 @@ ProcListProperties(ClientPtr client)
|
|||
if (numProps) {
|
||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
||||
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
|
||||
free(pAtoms);
|
||||
}
|
||||
free(pAtoms);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue