current_config,
IN_MODIFY);
}
+ break;
}
#ifdef HAVE_LUA
else {
for (i = 0; i <= font_count; i++) {
#ifdef XFT
if (use_xft) {
- XftFontClose(display, fonts[i].xftfont);
+ /*
+ * Do we not need to close fonts with Xft? Unsure. Not freeing the
+ * fonts seems to incur a slight memory leak, but it also prevents
+ * a crash.
+ *
+ * XftFontClose(display, fonts[i].xftfont);
+ */
fonts[i].xftfont = 0;
} else
#endif /* XFT */
free(draw_post_hook);
draw_post_hook = 0;
}
+ if (startup_hook) {
+ free(startup_hook);
+ startup_hook = 0;
+ }
+ if (shutdown_hook) {
+ free(shutdown_hook);
+ shutdown_hook = 0;
+ }
if(!lua_L) return;
lua_close(lua_L);
lua_L = NULL;
void llua_set_startup_hook(const char *args)
{
+ if (startup_hook) free(startup_hook);
startup_hook = strdup(args);
}
void llua_set_shutdown_hook(const char *args)
{
+ if (shutdown_hook) free(shutdown_hook);
shutdown_hook = strdup(args);
}
recvbuf[numbytes] = '\0';
DBGP2("imap_thread() received: %s", recvbuf);
if (strlen(recvbuf) > 2) {
- unsigned long messages, recent;
+ unsigned long messages, recent = 0;
char *buf = recvbuf;
char force_check = 0;
buf = strstr(buf, "EXISTS");
*visual = visual_list[i].visual;
*depth = visual_list[i].depth;
DBGP("Found ARGB Visual");
+ XFree(visual_list);
return 1;
}
}
// no argb visual available
DBGP("No ARGB Visual found");
+ XFree(visual_list);
return 0;
}
#endif /* USE_ARGB */