mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
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:
parent
3af6beea4b
commit
53c432d1fe
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user