From: Jeffrey Altman Date: Fri, 20 Jul 2012 14:20:02 +0000 (-0400) Subject: rx: fix abort on missing service X-Git-Tag: upstream/1.8.0_pre1^2~2197 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3ec1bdf9c74bd250d49065fa84475a5123461744;p=packages%2Fo%2Fopenafs.git rx: fix abort on missing service patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the possibility that a NULL connection pointer could be dereferenced. Prevent it. Change-Id: Ic813642c8073cedc3e4df578c1b06fecd22cfbdf Reviewed-on: http://gerrit.openafs.org/7794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 0fdeb5a22..79956d49e 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3246,10 +3246,11 @@ 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)) { - rxi_SendRawAbort(socket, host, port, RX_INVALID_OPERATION, - np, 0); - return np; + if (!conn) { + if (np->header.type != RX_PACKET_TYPE_ABORT) + rxi_SendRawAbort(socket, host, port, RX_INVALID_OPERATION, + np, 0); + return np; } /* If we're doing statistics, then account for the incoming packet */