channel.c:call_set_error(): fix memory leak

This commit is contained in:
Justin M. Keyes
2017-08-18 14:13:28 +02:00
parent af993da435
commit 0f442c328e
2 changed files with 7 additions and 1 deletions

View File

@@ -868,6 +868,7 @@ static void call_set_error(Channel *channel, char *msg, int loglevel)
ChannelCallFrame *frame = kv_A(channel->call_stack, i);
frame->returned = true;
frame->errored = true;
api_free_object(frame->result);
frame->result = STRING_OBJ(cstr_to_string(msg));
}