Skip to content
Snippets Groups Projects
Commit 20899900 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

knotc: fix crash if not connected in completion

parent 6f36f5a6
No related branches found
No related tags found
No related merge requests found
......@@ -155,6 +155,7 @@ int set_ctl(knot_ctl_t **ctl, const cmd_desc_t *desc, params_t *params)
int ret = knot_ctl_connect(*ctl, path);
if (ret != KNOT_EOK) {
knot_ctl_free(*ctl);
*ctl = NULL;
log_error("failed to connect to socket '%s' (%s)", path,
knot_strerror(ret));
free(path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment