Skip to content

Commit 399f7a6

Browse files
committed
Fix a memory leak when selecting a font using FONTSELECT protocol
This is always the case for Teradesk, which is used as the server
1 parent cfbee33 commit 399f7a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fontsel.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ _WORD do_fontsel(_WORD flags, char *title, _WORD *id, _WORD *pts)
344344

345345
else if ((flags & FS_M_FPROT) && (i = check_for_fprot()) >= 0)
346346
{
347+
if (gl_gdos)
348+
vst_unload_fonts(fs_handle, 0);
349+
350+
v_clsvwk(fs_handle);
347351
do_fprotokoll(i, *id, *pts);
348352
return FALSE; /* immer so, da neuer Font per Message kommt! */
349353
}

0 commit comments

Comments
 (0)