diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-10-08 09:35:01 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-10-08 09:39:07 -0700 |
commit | fe0c5f29cdd80d8d2c42f7c21a7077b6d744df9f (patch) | |
tree | d0c496d2395f19cf26d8373a4b007fe5172866cf | |
parent | de2ebd62c1eb8fe16c11aceac4a6981bda124cf4 (diff) |
_xgeGetExtensionVersion should not free info on failure
Flagged by gcc:
Xge.c: In function ‘_xgeCheckExtInit’:
Xge.c:154:20: warning: use after ‘free’ of ‘info’ [CWE-416]
[-Wanalyzer-use-after-free]
_xgeCheckExtInit passes the info pointer to _xgeGetExtensionVersion
and continues to use it after the call returns.
Fixes: 850263a ("Add GenericEvent extension (XGE).")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/Xge.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -188,7 +188,6 @@ _xgeGetExtensionVersion(Display* dpy, if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - Xfree(info); return NULL; } |