Browse Source

[mod_rewrite] Fix tiny memleak (GError not freed when regex compilation fails)

personal/stbuehler/wip
Thomas Porzelt 13 years ago
parent
commit
a3a1e2172e
  1. 2
      src/modules/mod_rewrite.c

2
src/modules/mod_rewrite.c

@ -407,6 +407,7 @@ static liAction* rewrite_create(liServer *srv, liPlugin* p, liValue *val) {
rewrite_free(NULL, rd);
rewrite_parts_free(rule.parts);
ERROR(srv, "rewrite: error compiling regex \"%s\": %s", g_array_index(arr, liValue*, 0)->data.string->str, err->message);
g_error_free(err);
return NULL;
}
@ -439,6 +440,7 @@ static liAction* rewrite_create(liServer *srv, liPlugin* p, liValue *val) {
rewrite_free(NULL, rd);
rewrite_parts_free(rule.parts);
ERROR(srv, "rewrite: error compiling regex \"%s\": %s", g_array_index(v->data.list, liValue*, 0)->data.string->str, err->message);
g_error_free(err);
return NULL;
}

Loading…
Cancel
Save