rpcbind/rpcbind-1.2.6-double-free.patch
Steve Dickson cba24ce316 Fixed a double free in init_transport (bz 2115517)
Signed-off-by: Steve Dickson <steved@redhat.com>
Resolves: bz2115517
2022-08-16 10:39:36 -04:00

16 lines
544 B
Diff

diff -up rpcbind-1.2.6/src/rpcbind.c.orig rpcbind-1.2.6/src/rpcbind.c
--- rpcbind-1.2.6/src/rpcbind.c.orig 2022-08-16 10:16:03.196903368 -0400
+++ rpcbind-1.2.6/src/rpcbind.c 2022-08-16 10:16:38.595062481 -0400
@@ -562,8 +562,10 @@ init_transport(struct netconfig *nconf)
syslog(LOG_ERR, "cannot bind %s on %s: %m",
(hosts[nhostsbak] == NULL) ? "*" :
hosts[nhostsbak], nconf->nc_netid);
- if (res != NULL)
+ if (res != NULL) {
freeaddrinfo(res);
+ res = NULL;
+ }
continue;
} else
checkbind++;