From: Garrett Wollman Date: Sun, 15 Jul 2012 19:01:29 +0000 (-0400) Subject: rx: don't leak a connection hash table in unlikely error condition X-Git-Tag: upstream/1.8.0_pre1^2~2223 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=53c432d1feba6454af4526b4d797b45a6f205eac;p=packages%2Fo%2Fopenafs.git 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 Tested-by: BuildBot --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 03d727031..8691f9661 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -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;