summaryrefslogtreecommitdiff
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index a5eff64e..31302abe 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -507,8 +507,7 @@ static int _parseconfig(const char *file, const char *givensection,
}
} else {
/* directive */
- char *key;
- const char *upperkey;
+ char *key, *upperkey;
/* strsep modifies the 'line' string: 'key \0 ptr' */
key = line;
ptr = line;
@@ -677,9 +676,13 @@ static int _parseconfig(const char *file, const char *givensection,
return(1);
}
}
+ free(upperkey);
}
}
fclose(fp);
+ if(section){
+ free(section);
+ }
pm_printf(PM_LOG_DEBUG, "config: finished parsing %s\n", file);
return(0);