dccp_recv: Avoid NULL pointer dereference.
authorAndre Noll <maan@systemlinux.org>
Thu, 15 Sep 2011 12:33:14 +0000 (14:33 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 21 Sep 2011 09:04:12 +0000 (11:04 +0200)
commit38d84047c685ffd9409fc10fec1f02b095d98aed
tree832fb93fbae5062388b3507678fae7b6ac7e4867
parentf60bda0c58218b9c5a617e82c2dcdd7c2f203fb5
dccp_recv: Avoid NULL pointer dereference.

dccp_recv.c:48:16: warning: Access to field 'btrp' results in a dereference of a null pointer (loaded from variable 'pdd')
        btr_pool_free(pdd->btrp);
                      ^~~

In dccp_recv_close(), if pdd is NULL, we avoid closing pdd->fd but
dereference pdd nevertheless one line later. Fix this by returning
early if pdd is NULL.
dccp_recv.c