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:
11
src/conf.c
11
src/conf.c
@@ -186,11 +186,15 @@ static ConfigParam * readConfigBlock(FILE * fp, int * count, char * string) {
|
|||||||
|
|
||||||
argsMinusComment = i;
|
argsMinusComment = i;
|
||||||
|
|
||||||
if(0 == argsMinusComment) continue;
|
if(0 == argsMinusComment) {
|
||||||
|
freeArgArray(array, numberOfArgs);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(1 == argsMinusComment &&
|
if(1 == argsMinusComment &&
|
||||||
0 == strcmp(array[0], CONF_BLOCK_END))
|
0 == strcmp(array[0], CONF_BLOCK_END))
|
||||||
{
|
{
|
||||||
|
freeArgArray(array, numberOfArgs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +252,10 @@ void readConf(char * file) {
|
|||||||
|
|
||||||
argsMinusComment = i;
|
argsMinusComment = i;
|
||||||
|
|
||||||
if(0 == argsMinusComment) continue;
|
if(0 == argsMinusComment) {
|
||||||
|
freeArgArray(array, numberOfArgs);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(2 != argsMinusComment) {
|
if(2 != argsMinusComment) {
|
||||||
ERROR("improperly formatted config file at line %i:"
|
ERROR("improperly formatted config file at line %i:"
|
||||||
|
Reference in New Issue
Block a user