From 3849e598ac043e59ef27f807e835b7801eb7479a Mon Sep 17 00:00:00 2001 From: Gabriel VLASIU Date: Thu, 4 Apr 2013 15:56:53 +0300 Subject: [PATCH] wmbiff: Free memory when using a custom skin. --- wmbiff/wmbiff/wmbiff.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wmbiff/wmbiff/wmbiff.c b/wmbiff/wmbiff/wmbiff.c index 2295f06..8a4fa07 100644 --- a/wmbiff/wmbiff/wmbiff.c +++ b/wmbiff/wmbiff/wmbiff.c @@ -88,6 +88,7 @@ static unsigned int num_mailboxes = 1; static const int x_origin = 5; static const int y_origin = 5; static int forever = 1; /* keep running. */ +unsigned int custom_skin = 0; /* user has choose a custom skin */ extern Window win; extern Window iconwin; @@ -251,6 +252,7 @@ static int Read_Config_File(char *filename, int *loopinterval) continue; } else if (!strcmp(setting, "skinfile")) { skin_filename = strdup_ordie(value); + custom_skin = 1; continue; } else if (!strcmp(setting, "certfile")) { /* not yet supported */ certificate_filename = strdup_ordie(value); @@ -1407,6 +1409,8 @@ int main(int argc, const char *argv[]) // free resources if (restart_args) free(restart_args); + if (custom_skin) + free((void *)skin_filename); return 0; }