summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-03-11 18:08:23 +0100
committerportix <portix@gmx.net>2012-03-11 18:08:23 +0100
commitce70744b3c0bc1f8198b24372fc7e33b4b3e1e42 (patch)
tree322ef581a7ae05d4a5d8fd1c824defdb6d03fc3c
parentce32247bbca20d0dd0e38a4642c4f4c1fb91fff9 (diff)
downloaddwb-ce70744b3c0bc1f8198b24372fc7e33b4b3e1e42.zip
Fixing possible SIGABRT in dwb_set_setting when the setting is set from commandline
-rw-r--r--src/adblock.c1
-rw-r--r--src/dwb.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/adblock.c b/src/adblock.c
index c39100f6..3cb6d67f 100644
--- a/src/adblock.c
+++ b/src/adblock.c
@@ -144,6 +144,7 @@ adblock_element_hider_free(AdblockElementHider *hider) {
static inline gboolean
adblock_do_match(AdblockRule *rule, const char *uri) {
if (g_regex_match(rule->pattern, uri, 0, NULL)) {
+ printf("blocked %s %s\n", uri, g_regex_get_pattern(rule->pattern));
PRINT_DEBUG("blocked %s %s\n", uri, g_regex_get_pattern(rule->pattern));
return true;
}
diff --git a/src/dwb.c b/src/dwb.c
index 7db2ba35..ce0e631e 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -1057,7 +1057,7 @@ dwb_toggle_setting(const char *key) {
DwbStatus
dwb_set_setting(const char *key, char *value) {
WebSettings *s;
- Arg *a = NULL, oldarg;
+ Arg *a = NULL, oldarg = { .p = NULL };
DwbStatus ret = STATUS_ERROR;
@@ -1071,7 +1071,6 @@ dwb_set_setting(const char *key, char *value) {
if (dwb_apply_settings(s) != STATUS_ERROR) {
dwb_set_normal_message(dwb.state.fview, true, "Saved setting %s: %s", s->n.first, s->type == BOOLEAN ? ( s->arg.b ? "true" : "false") : value);
dwb_save_key_value(dwb.files.settings, key, value);
- g_free(oldarg.p);
ret = STATUS_OK;
}
else {