Commit 6e0c4369 authored by Warren Dukes's avatar Warren Dukes

fix a few memory leaks in conf.c

git-svn-id: https://svn.musicpd.org/mpd/trunk@2603 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent d6a87f53
......@@ -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:"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment