Commit c4710e95 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

varnishadm: Plug unlikely leak

Spotted by Coverity Scan.
parent 43d85922
......@@ -253,9 +253,9 @@ command_generator (const char *text, int state)
return (NULL);
}
jsn_cmds = vjsn_parse(answer, &err);
free(answer);
if (err != NULL)
return (NULL);
free(answer);
AN(jsn_cmds);
AN(jsn_cmds->value);
assert (vjsn_is_array(jsn_cmds->value));
......
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