mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Fix a potential free() of stack memory in screenshot code. Ouch!
git-svn-id: https://svn.eduke32.com/eduke32@2363 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
165d291a48
commit
2d6f24a3f2
1 changed files with 3 additions and 3 deletions
|
@ -15609,10 +15609,7 @@ static int32_t screencapture_common1(char *fn, const char *ext, BFILE** filptr)
|
|||
|
||||
*filptr = Bfopen(fn,"wb");
|
||||
if (*filptr == NULL)
|
||||
{
|
||||
Bfree(fn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -15774,7 +15771,10 @@ static int32_t screencapture_tga(const char *filename, char inverseit)
|
|||
|
||||
i = screencapture_common1(fn, "tga", &fil);
|
||||
if (i)
|
||||
{
|
||||
Bfree(fn);
|
||||
return i;
|
||||
}
|
||||
|
||||
# ifdef USE_OPENGL
|
||||
if (rendmode >= 3 && qsetmode == 200)
|
||||
|
|
Loading…
Reference in a new issue