rx: don't leak a connection hash table in unlikely error condition

If getsockname() returns an error (which shouldn't be possible),
rx_InitHost would leak a connection hash table (which probably
doesn't matter because the caller will just exit anyway).  Make
the analyzer happy by freeing the memory anyway.

Change-Id: If8e78ebfb787d2dc1c0b9f95f91b6e7510c9e307
Reviewed-on: http://gerrit.openafs.org/7768
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Garrett Wollman 2012-07-15 15:01:29 -04:00 committed by Derrick Brashear
parent 3af6beea4b
commit 53c432d1fe

View File

@ -607,6 +607,7 @@ rx_InitHost(u_int host, u_int port)
#endif
if (getsockname((intptr_t)rx_socket, (struct sockaddr *)&addr, &addrlen)) {
rx_Finalize();
osi_Free(htable, rx_hashTableSize * sizeof(struct rx_connection *));
return -1;
}
rx_port = addr.sin_port;