comparison mcabber/src/settings.c @ 895:b461d7ee6d96

Minor changes Cosmetic change + fix for a small memory leak when the configuration file doesn't exist.
author Mikael Berthe <mikael@lilotux.net>
date Fri, 02 Jun 2006 20:39:01 +0200
parents a0ddc43b421e
children 303408ef5e5d
comparison
equal deleted inserted replaced
894:f76b32ff2f14 895:b461d7ee6d96
87 if ((fp = fopen(filename, "r")) == NULL) { 87 if ((fp = fopen(filename, "r")) == NULL) {
88 // 2nd try... 88 // 2nd try...
89 sprintf(filename, "%s/.mcabberrc", home); 89 sprintf(filename, "%s/.mcabberrc", home);
90 if ((fp = fopen(filename, "r")) == NULL) { 90 if ((fp = fopen(filename, "r")) == NULL) {
91 fprintf(stderr, "Cannot open config file!\n"); 91 fprintf(stderr, "Cannot open config file!\n");
92 g_free(filename);
92 return -1; 93 return -1;
93 } 94 }
94 } 95 }
95 // Check configuration file permissions 96 // Check configuration file permissions
96 // As it could contain sensitive data, we make it user-readable only 97 // As it could contain sensitive data, we make it user-readable only