From 411340ccb7070e2e966a36f64f2fb3019ea0242a Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 29 Nov 2007 13:49:21 -0800 Subject: Coverity #743/744: Returned without freeing storage bufp/savp If either bufp or savp failed to malloc, we returned without freeing the other. --- src/XGMotion.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/XGMotion.c b/src/XGMotion.c index daa8792..cd361dd 100644 --- a/src/XGMotion.c +++ b/src/XGMotion.c @@ -115,6 +115,8 @@ Time stop; savp = readp = (int *)Xmalloc(size); bufp = (int *)Xmalloc(size2); if (!bufp || !savp) { + Xfree(bufp); + Xfree(savp); *nEvents = 0; _XEatData(dpy, (unsigned long)size); UnlockDisplay(dpy); -- cgit v1.2.3