[PATCH libXi] man: note that callers of XIQueryPointer must free the button mask.

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 31 13:38:20 PST 2011


buttons_return->mask is allocated by the library and must be freed by the
caller to avoid leaking.

Reported-by: Matthias Clasen <mclasen at redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---

bonus points to me for great API design...

 man/XIQueryPointer.txt |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/man/XIQueryPointer.txt b/man/XIQueryPointer.txt
index 445f8b5..73fc11e 100644
--- a/man/XIQueryPointer.txt
+++ b/man/XIQueryPointer.txt
@@ -76,6 +76,9 @@ DESCRIPTION
    selected to obtain the data for modifiers_return and
    group_return.
 
+   The mask field in buttons_return is dynamically allocated and
+   must be freed by the caller.
+
    XIQueryPointer is identical to XQueryPointer but specifies the
    device explicitly.
 
-- 
1.7.3.4



More information about the xorg-devel mailing list