Commit aa7ab50e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Reza Naghibi

It is OK to call realloc(3) with a NULL pointer

parent 3808881e
...@@ -380,12 +380,8 @@ shardcfg_backend_expand(const struct backend_reconfig *re) ...@@ -380,12 +380,8 @@ shardcfg_backend_expand(const struct backend_reconfig *re)
else else
re->shardd->l_backend <<= 1; re->shardd->l_backend <<= 1;
if (re->shardd->backend) re->shardd->backend = realloc(re->shardd->backend,
re->shardd->backend = realloc(re->shardd->backend, re->shardd->l_backend * sizeof *re->shardd->backend);
re->shardd->l_backend * sizeof *re->shardd->backend);
else
re->shardd->backend = malloc(
re->shardd->l_backend * sizeof *re->shardd->backend);
AN(re->shardd->backend); AN(re->shardd->backend);
} }
......
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