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:
parent
d6a87f538d
commit
6e0c4369c3
11
src/conf.c
11
src/conf.c
|
@ -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:"
|
||||
|
|
Loading…
Reference in New Issue