aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-11 03:20:49 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-11 03:20:49 +0000
commit6e0c4369c37df64764e3aaa49365d6560a3a3806 (patch)
treed822c52b79c780f228f85c9430f4fa394f16862b /src
parentd6a87f538d2347cd4610962a0004052c0c6ba8de (diff)
downloadmpd-6e0c4369c37df64764e3aaa49365d6560a3a3806.tar.gz
mpd-6e0c4369c37df64764e3aaa49365d6560a3a3806.tar.xz
mpd-6e0c4369c37df64764e3aaa49365d6560a3a3806.zip
fix a few memory leaks in conf.c
git-svn-id: https://svn.musicpd.org/mpd/trunk@2603 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/conf.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/conf.c b/src/conf.c
index 77ef13ba4..9c08bb3da 100644
--- a/src/conf.c
+++ b/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:"