diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-11-29 13:49:21 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-11-29 13:50:52 -0800 |
commit | 411340ccb7070e2e966a36f64f2fb3019ea0242a (patch) | |
tree | fad76c97ea1d0d87af3068d46e29966c48366baa | |
parent | 5ac8f5dcfb2cf5f695c903179a5a95ac6bd4303e (diff) |
Coverity #743/744: Returned without freeing storage bufp/savp
If either bufp or savp failed to malloc, we returned without freeing the other.
-rw-r--r-- | src/XGMotion.c | 2 |
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); |