Commit aebfbe94 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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

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