fix a few memory leaks in conf.c

git-svn-id: https://svn.musicpd.org/mpd/trunk@2603 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-11-11 03:20:49 +00:00
parent d6a87f538d
commit 6e0c4369c3
1 changed files with 9 additions and 2 deletions

View File

@ -186,11 +186,15 @@ static ConfigParam * readConfigBlock(FILE * fp, int * count, char * string) {
argsMinusComment = i;
if(0 == argsMinusComment) continue;
if(0 == argsMinusComment) {
freeArgArray(array, numberOfArgs);
continue;
}
if(1 == argsMinusComment &&
0 == strcmp(array[0], CONF_BLOCK_END))
{
freeArgArray(array, numberOfArgs);
break;
}
@ -248,7 +252,10 @@ void readConf(char * file) {
argsMinusComment = i;
if(0 == argsMinusComment) continue;
if(0 == argsMinusComment) {
freeArgArray(array, numberOfArgs);
continue;
}
if(2 != argsMinusComment) {
ERROR("improperly formatted config file at line %i:"