projects
/
browser-switch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix memory leak when repeated options are encountered in config file
[browser-switch]
/
config.c
diff --git
a/config.c
b/config.c
index
8928a3d
..
395bcf2
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-119,6
+119,10
@@
static int swb_config_load_option(struct swb_config *cfg,
break;
}
cfg->flags |= opt->set_mask;
+ } else {
+ /* Option was repeated in the config file
+ We want the first value, so ignore this one */
+ free(value);
}
retval = 1;
break;