[PATCH xserver] dix: don't free() stack memory
Keith Packard
keithp at keithp.com
Tue Mar 13 16:22:17 UTC 2018
Eric Engestrom <eric.engestrom at imgtec.com> writes:
> I'll look at the code more closely to figure out when the free is
> needed, but I just saw this warning and had a look, this isn't code I'm
> familiar with *at all*, so I might just end up giving up if I can't
> figure it out easily enough :/
There's no free of stack memory in this path, but the compiler can't
figure it out. The free path is only hit if the client had been put to
sleep to wait for the font, in which case the original stack structure
would have been copied to allocated memory.
Hrm. It might be easy to fix this by simply creating a new function to
pass to ClientSleep which does the free and leave doImageText out of
that part.
Alternatively, leave the code alone and stick some comments or
instructions for the compiler to not complain.
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180313/a237b9ac/attachment.sig>
More information about the xorg-devel
mailing list