Fix font memory leak. (#57)
* Fix font memory leak. This memory leak has always been present in sxiv. The font opened on window.c:58 was never closed, so I closed it, fixing a 2kB memory leak. * document changes Co-authored-by: NRK <nrk@disroot.org>
This commit is contained in:
1
window.c
1
window.c
@ -61,6 +61,7 @@ void win_init_font(const win_env_t *e, const char *fontstr)
|
||||
fontheight = font->ascent + font->descent;
|
||||
FcPatternGetDouble(font->pattern, FC_SIZE, 0, &fontsize);
|
||||
barheight = fontheight + 2 * V_TEXT_PAD;
|
||||
XftFontClose(e->dpy, font);
|
||||
}
|
||||
|
||||
void win_alloc_color(const win_env_t *e, const char *name, XftColor *col)
|
||||
|
Reference in New Issue
Block a user