summaryrefslogtreecommitdiff
path: root/src/XGMotion.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-11-29 13:49:21 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-11-29 13:50:52 -0800
commit411340ccb7070e2e966a36f64f2fb3019ea0242a (patch)
treefad76c97ea1d0d87af3068d46e29966c48366baa /src/XGMotion.c
parent5ac8f5dcfb2cf5f695c903179a5a95ac6bd4303e (diff)
Coverity #743/744: Returned without freeing storage bufp/savp
If either bufp or savp failed to malloc, we returned without freeing the other.
Diffstat (limited to 'src/XGMotion.c')
-rw-r--r--src/XGMotion.c2
1 files changed, 2 insertions, 0 deletions
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);