Plug insignificant vcc leaks

Ref Coverity CIDs 1362617, 1362618, 1362624, 1362626
parent 6cf146bd
......@@ -200,6 +200,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
vcc_ErrWhere(tl, ae2->t_addr);
VSB_cat(tl->sb, "vs:\n");
vcc_ErrWhere(tl, aen->t_addr);
free(aen);
return;
}
/*
......@@ -387,12 +388,14 @@ vcc_acl_entry(struct vcc *tl)
if (*e != '\0') {
VSB_cat(tl->sb, ".../mask is not numeric.\n");
vcc_ErrWhere(tl, ae->t_addr);
free(ae);
return;
}
ae->t_mask = ae->t_addr;
if (tl->t->tok == '/') {
VSB_cat(tl->sb, "/mask only allowed once.\n");
vcc_ErrWhere(tl, tl->t);
free(ae);
return;
}
} else if (tl->t->tok == '/') {
......
......@@ -261,6 +261,7 @@ vcc_ParseProbeSpec(struct vcc *tl, const struct symbol *sym, char **name)
SkipToken(tl, ';');
}
free(fs);
if (t_threshold != NULL || t_window != NULL) {
if (t_threshold == NULL && t_window != NULL) {
......@@ -353,20 +354,6 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be, const char *vgcname)
unsigned u;
double t;
fs = vcc_FldSpec(tl,
"?host",
"?port",
"?path",
"?host_header",
"?connect_timeout",
"?first_byte_timeout",
"?between_bytes_timeout",
"?probe",
"?max_connections",
"?proxy_header",
NULL);
if (tl->t->tok == ID &&
(vcc_IdIs(tl->t, "none") || vcc_IdIs(tl->t, "None"))) {
vcc_NextToken(tl);
......@@ -391,6 +378,19 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be, const char *vgcname)
return;
}
fs = vcc_FldSpec(tl,
"?host",
"?port",
"?path",
"?host_header",
"?connect_timeout",
"?first_byte_timeout",
"?between_bytes_timeout",
"?probe",
"?max_connections",
"?proxy_header",
NULL);
tl->fb = VSB_new_auto();
AN(tl->fb);
......@@ -512,6 +512,7 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be, const char *vgcname)
}
vcc_FieldsOk(tl, fs);
free(fs);
ERRCHK(tl);
ExpectErr(tl, '}');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment