Skip to content
Snippets Groups Projects

ciolib_movetext: Do not leak fill buffer

Closed anonymouspage requested to merge anonymouspage/sbbs:fill-buffer-leak into master
1 file
+ 1
3
Compare changes
  • Side-by-side
  • Inline
+ 1
3
@@ -577,6 +577,7 @@ CIOLIBEXPORT int ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy)
goto fail;
}
free(buf);
return(1);
fail:
@@ -1169,13 +1170,10 @@ CIOLIBEXPORT void ciolib_normvideo(void)
*/
CIOLIBEXPORT int ciolib_puttext(int a,int b,int c,int d,void *e)
{
char *buf=e;
int ret;
CIOLIB_INIT();
ret = cio_api.puttext(a,b,c,d,(void *)buf);
if (buf != e)
free(buf);
return ret;
}
Loading