From 12423f170f4371c0c02f20676564ae73e856dd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Mon, 8 Mar 2010 19:37:10 +0000 Subject: [PATCH] Fix memleak due to incorrect VirtualFree arguments: size must be 0 for MEM_RELEASE. Originally committed as revision 30863 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale --- libswscale/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 1674d764e5..2b9f272825 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1538,8 +1538,8 @@ void sws_freeContext(SwsContext *c) if (c->lumMmx2FilterCode) munmap(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize); if (c->chrMmx2FilterCode) munmap(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize); #elif HAVE_VIRTUALALLOC - if (c->lumMmx2FilterCode) VirtualFree(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize, MEM_RELEASE); - if (c->chrMmx2FilterCode) VirtualFree(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, MEM_RELEASE); + if (c->lumMmx2FilterCode) VirtualFree(c->lumMmx2FilterCode, 0, MEM_RELEASE); + if (c->chrMmx2FilterCode) VirtualFree(c->chrMmx2FilterCode, 0, MEM_RELEASE); #else av_free(c->lumMmx2FilterCode); av_free(c->chrMmx2FilterCode);