summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Bergantinos Corpas <rbergant@redhat.com>2021-05-10 12:53:19 -0400
committerSteve Dickson <steved@redhat.com>2021-05-10 12:53:19 -0400
commit7fcf2b27097fda927d637835468a83ed1b918001 (patch)
treefaab97fe50d4a3b21a75424cdbd88ab8ef2c256b
parent7be92b30e47801c651e5316217d1651454653f68 (diff)
downloadrpcbind-7fcf2b27097fda927d637835468a83ed1b918001.tar.gz
network_init: initialize response addrinfo list to NULLrpcbind-1_2_6-rc7
res pointer is not initialized, if for some reason it does not take any value after calling getaddrinfo, we end up causing oops when calling freeaddrinfo Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 564e3a2..4af8b9b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -309,7 +309,7 @@ network_init()
int s;
#endif
int ecode;
- struct addrinfo hints, *res;
+ struct addrinfo hints, *res = NULL;
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_INET;