summaryrefslogtreecommitdiff
path: root/catgconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'catgconf.c')
-rw-r--r--catgconf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/catgconf.c b/catgconf.c
index dc0f312..f3d7b9c 100644
--- a/catgconf.c
+++ b/catgconf.c
@@ -6,10 +6,12 @@
#include "gconfig.h"
void listconfig(struct gconffile **cf, char *block, int compact) {
- char *opt, *val;
+ char *opt = NULL, *val = NULL;
int conftype;
for (;;) {
+ free(opt);
+ free(val);
getconfigline(cf, block, &opt, &val, &conftype);
if (!opt)
return;