mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-22 02:12:10 +03:00
Fix memory leak
This commit is contained in:
parent
9c2fbde917
commit
f9bb4ba71d
18
amiga/font.c
18
amiga/font.c
@ -640,14 +640,18 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
|
|||||||
#else
|
#else
|
||||||
/* On OS3 the glyph needs to be in chip RAM */
|
/* On OS3 the glyph needs to be in chip RAM */
|
||||||
void *chip_glyph = AllocVec(glyph->glm_BMModulo * glyph->glm_BMRows, MEMF_CHIP);
|
void *chip_glyph = AllocVec(glyph->glm_BMModulo * glyph->glm_BMRows, MEMF_CHIP);
|
||||||
CopyMem(glyphbm, chip_glyph, glyph->glm_BMModulo * glyph->glm_BMRows);
|
if(chip_glyph != NULL) {
|
||||||
|
CopyMem(glyphbm, chip_glyph, glyph->glm_BMModulo * glyph->glm_BMRows);
|
||||||
|
|
||||||
BltTemplate(chip_glyph + (glyph->glm_BMModulo * glyph->glm_BlackTop) +
|
BltTemplate(chip_glyph + (glyph->glm_BMModulo * glyph->glm_BlackTop) +
|
||||||
((glyph->glm_BlackLeft >> 4) << 1),
|
((glyph->glm_BlackLeft >> 4) << 1),
|
||||||
glyph->glm_BlackLeft & 0xF, glyph->glm_BMModulo, rp,
|
glyph->glm_BlackLeft & 0xF, glyph->glm_BMModulo, rp,
|
||||||
x - glyph->glm_X0 + glyph->glm_BlackLeft,
|
x - glyph->glm_X0 + glyph->glm_BlackLeft,
|
||||||
y - glyph->glm_Y0 + glyph->glm_BlackTop,
|
y - glyph->glm_Y0 + glyph->glm_BlackTop,
|
||||||
glyph->glm_BlackWidth, glyph->glm_BlackHeight);
|
glyph->glm_BlackWidth, glyph->glm_BlackHeight);
|
||||||
|
|
||||||
|
FreeVec(chip_glyph);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user