Age | Commit message (Collapse) | Author |
|
Found by gcc 12 analyzer:
xkbatom.c: In function ‘XkbChangeAtomDisplay’:
xkbatom.c:218:16: warning: leak of ‘tmp’ [CWE-401] [-Wanalyzer-malloc-leak]
xkbatom.c:220:12: warning: leak of ‘tmp’ [CWE-401] [-Wanalyzer-malloc-leak]
220 | return XInternAtom(dpy, name, onlyIfExists);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 5e5bd09 ("Fix offline operation.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Handles gcc 12 analyzer warning:
xkbatom.c: In function ‘_XkbInitAtoms’:
xkbatom.c:194:21: warning: dereference of possibly-NULL ‘nodeTable’
[CWE-690] [-Wanalyzer-possible-null-dereference]
194 | nodeTable[None] = (NodePtr) NULL;
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
nd->string is always the result of a new allocation, so can
never be equal to string.
This resolves a warning from the gcc 12 analyzer, which reported
a memory leak if the impossible condition was ever true:
In file included from xkbatom.c:85:
xkbatom.c: In function ‘_XkbMakeAtom’:
XKBfileInt.h:51:33: warning: leak of ‘<unknown>’ [CWE-401]
[-Wanalyzer-malloc-leak]
[...]
| 158 | if (!table) {
| | ^
| | |
| | (15) following ‘true’ branch (when ‘table’ is NULL)...
| 159 | if (nd->string != string)
| | ~~ ~
| | | |
| | | (17) following ‘false’ branch...
| | (16) ...to here
| 161 | _XkbFree(nd);
| | ^~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reported in https://gitlab.freedesktop.org/xorg/lib/libxkbfile/issues/5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Matches XInternAtom, which it wraps, and quiets a bunch of const warnings
in xkbcomp.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
xc/lib/xkbfile
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|