From 439f40b7b6be39da244a883c9056f2522a9bcea2 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 26 Aug 2024 13:10:14 -0700 Subject: Use _XkbReallocF to avoid memory leaks when realloc() fails Signed-off-by: Alan Coopersmith Part-of: --- src/xkmread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3