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
release/0.6
Reimar Döffinger 15 years ago
parent 0926c00980
commit 12423f170f
  1. 4
      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);

Loading…
Cancel
Save