From 7bc07d6c07da3e5c8e26d466c6cebc77bbfb62a9 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 20 Dec 2016 19:53:41 +1100 Subject: [PATCH] Set ip and port to NULL in _btc_io to cope with reused free in extract_sockaddr --- src/ckdb_btc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ckdb_btc.c b/src/ckdb_btc.c index 6047401b..3295c09e 100644 --- a/src/ckdb_btc.c +++ b/src/ckdb_btc.c @@ -108,7 +108,7 @@ static int read_socket(int fd, char **buf, int timeout) static char *_btc_io(__maybe_unused const char *cmd, char *json, WHERE_FFL_ARGS) { - char *ip, *port; + char *ip = NULL, *port = NULL; char *data, *ans, *res, *ptr; int fd, ret, red; size_t len;