Instance: use std::unique_ptr<> to manage the NeighborGlue pointer

This commit is contained in:
Max Kellermann
2019-04-25 13:09:31 +02:00
parent 692c8025a2
commit f764925edc
4 changed files with 9 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ CommandResult
handle_listneighbors(Client &client, gcc_unused Request args, Response &r)
{
const NeighborGlue *const neighbors =
client.GetInstance().neighbors;
client.GetInstance().neighbors.get();
if (neighbors == nullptr) {
r.Error(ACK_ERROR_UNKNOWN, "No neighbor plugin configured");
return CommandResult::ERROR;