rx: fix abort on missing service

patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced
the possibility that a NULL connection pointer could be dereferenced.
Prevent it.

Reviewed-on: http://gerrit.openafs.org/7794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 3ec1bdf9c74bd250d49065fa84475a5123461744)

Change-Id: I1e01005a34e5d373b6810052d94fac8d96f40e4f
Reviewed-on: http://gerrit.openafs.org/8371
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Jeffrey Altman 2012-07-20 10:20:02 -04:00
parent 598e58ba6f
commit 21ae26a93d

View File

@ -3173,7 +3173,8 @@ rxi_ReceivePacket(struct rx_packet *np, osi_socket socket,
/* To avoid having 2 connections just abort at each other,
don't abort an abort. */
if (!conn && (np->header.type != RX_PACKET_TYPE_ABORT)) {
if (!conn) {
if (np->header.type != RX_PACKET_TYPE_ABORT)
rxi_SendRawAbort(socket, host, port, RX_INVALID_OPERATION,
np, 0);
return np;