From: Gabriel VLASIU Date: Thu, 4 Apr 2013 12:56:53 +0000 (+0300) Subject: wmbiff: Free memory when using a custom skin. X-Git-Tag: wmix-3.2~38 X-Git-Url: https://repo.or.cz/w/dockapps.git/commitdiff_plain/3849e598ac043e59ef27f807e835b7801eb7479a wmbiff: Free memory when using a custom skin. --- 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; }