Commit d4dfd024 authored by Daniel Salzman's avatar Daniel Salzman

Fix memory leaks (cppcheck)

parent 327784f8
......@@ -1383,6 +1383,7 @@ conf_remote_t conf_remote(
conf_val_t val = conf_id_get(conf, C_RMT, C_ADDR, id);
if (val.code != KNOT_EOK) {
log_error("invalid remote in configuration");
free(rundir);
return out;
}
out.addr = conf_addr(&val, rundir);
......
......@@ -219,6 +219,7 @@ int include_file(
char *full_current_name = realpath((args->file_name != NULL) ?
args->file_name : "./", NULL);
if (full_current_name == NULL) {
free(path);
return KNOT_ENOMEM;
}
......
......@@ -738,6 +738,7 @@ int remote_answer(int sock, server_t *s, knot_pkt_t *pkt)
remote_cmdargs_t args = { 0 };
int ret = cmdargs_init(&args);
if (ret != KNOT_EOK) {
free(cmd);
return ret;
}
......
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