From bc7e83137ed2a14957e1b3feb5de658f8505ed57 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Mon, 4 Jan 2016 00:58:57 +0100
Subject: Fix usage of freeaddrinfo() in connector
---
liberty.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/liberty.c b/liberty.c
index 78371f5..fece828 100644
--- a/liberty.c
+++ b/liberty.c
@@ -3953,10 +3953,11 @@ connector_target_destroy (struct connector_target *self)
async_cancel (self->getaddrinfo_event);
if (self->getaddrinfo_error)
error_free (self->getaddrinfo_error);
+ if (self->results)
+ freeaddrinfo (self->results);
free (self->hostname);
free (self->service);
- freeaddrinfo (self->results);
free (self);
}
--
cgit v1.2.3-70-g09d2