From dd25684d6f67b8c5a836b98d224ac6bf21076972 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 18 Sep 2006 16:29:46 -0700 Subject: Coverity CID #580: XvQueryEncodings Returned without freeing storage "pes" Free the portion of the encoding list we had already filled in if we get an error allocating memory for a list entry. --- src/Xv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Xv.c b/src/Xv.c index d92bd71..3c999a1 100644 --- a/src/Xv.c +++ b/src/Xv.c @@ -381,6 +381,7 @@ XvQueryEncodings( u.buffer += (sz_xvEncodingInfo + 3) & ~3; if ( (name = (char *)Xmalloc(size+1)) == NULL) { + XvFreeEncodingInfo(pes); Xfree(buffer); UnlockDisplay(dpy); SyncHandle(); -- cgit v1.2.3