Commit be7d170d authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

No need to assign NULL after VSB_destroy

parent 6ec734af
......@@ -537,9 +537,7 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
}
#undef R
VSB_printf(vep->vsb, "%c", 0);
VSB_destroy(&vep->include_src);
vep->include_src = NULL;
}
/*---------------------------------------------------------------------
......@@ -887,7 +885,6 @@ VEP_Parse(struct vep_state *vep, const char *p, size_t l)
if (vep->attr_vsb != NULL) {
AZ(VSB_finish(vep->attr_vsb));
VSB_destroy(&vep->attr_vsb);
vep->attr_vsb = NULL;
}
} else if (p < e) {
vep->attr_delim = 0;
......
......@@ -128,7 +128,6 @@ static void
mgt_panic_clear(void)
{
VSB_destroy(&child_panic);
child_panic = NULL;
}
void __match_proto__(cli_func_t)
......
......@@ -528,10 +528,8 @@ cmd_logexp(CMD_ARGS)
vtc_log(le->vl, 0, "Missing -v argument");
return;
}
if (le->n_arg != NULL) {
if (le->n_arg != NULL)
VSB_destroy(&le->n_arg);
le->n_arg = NULL;
}
vsb = VSB_new_auto();
AN(vsb);
AZ(VSB_printf(vsb, "%s/%s", tmpdir, av[1]));
......
......@@ -453,7 +453,6 @@ cls_vlu(void *priv, const char *p)
free(cli->cmd);
cli->cmd = NULL;
VSB_destroy(&cfd->last_arg);
cfd->last_arg = NULL;
cfd->last_idx = 0;
return (i);
}
......
......@@ -161,7 +161,6 @@ VSL_ResetError(struct VSL_data *vsl)
if (vsl->diag == NULL)
return;
VSB_destroy(&vsl->diag);
vsl->diag = NULL;
}
static int
......
......@@ -124,7 +124,6 @@ VSM_ResetError(struct VSM_data *vd)
if (vd->diag == NULL)
return;
VSB_destroy(&vd->diag);
vd->diag = NULL;
}
/*--------------------------------------------------------------------*/
......
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