#include #include int main(){ Display* display = XOpenDisplay(NULL); int screen = DefaultScreen(display); XftFont* font = XftFontOpenName(display, screen, "6x10"); // Commenting this and the next line makes the code ok for valgrind XftFontClose(display, font); XCloseDisplay(display); return 0; }