summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-08-26 13:10:14 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-08-26 13:46:47 -0700
commit439f40b7b6be39da244a883c9056f2522a9bcea2 (patch)
treef1a922ea24b6764c6913594bed8c22e4d7e82606 /src
parent56a4ce41cfdea20b5856eb19f99d8fbb535955b3 (diff)
Use _XkbReallocF to avoid memory leaks when realloc() fails
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxkbfile/-/merge_requests/20>
Diffstat (limited to 'src')
-rw-r--r--src/xkmread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xkmread.c b/src/xkmread.c
index f279322..3789c1c 100644
--- a/src/xkmread.c
+++ b/src/xkmread.c
@@ -64,7 +64,7 @@ XkmInsureSize(XPointer oldPtr, int oldCount, int *newCountRtrn, int elemSize)
oldPtr = (XPointer) _XkbCalloc(newCount, elemSize);
}
else if (oldCount < newCount) {
- oldPtr = (XPointer) _XkbRealloc(oldPtr, newCount * elemSize);
+ oldPtr = (XPointer) _XkbReallocF(oldPtr, newCount * elemSize);
if (oldPtr != NULL) {
char *tmp = (char *) oldPtr;