From: Li Zefan Date: Thu, 10 Apr 2008 08:58:06 +0000 (-0700) Subject: SCTP: fix wrong debug counting of bind_bucket X-Git-Tag: v2.6.26-rc1~1138^2~146 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=commitdiff_plain;h=935a7f6e4d2f2c69a2d94cbda377684fffbdcb27 SCTP: fix wrong debug counting of bind_bucket Should not count it if the allocation of the object is failed. Signed-off-by: Li Zefan Signed-off-by: David S. Miller --- diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 00ebd0610be..025f467d80d 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5761,8 +5761,8 @@ static struct sctp_bind_bucket *sctp_bucket_create( struct sctp_bind_bucket *pp; pp = kmem_cache_alloc(sctp_bucket_cachep, GFP_ATOMIC); - SCTP_DBG_OBJCNT_INC(bind_bucket); if (pp) { + SCTP_DBG_OBJCNT_INC(bind_bucket); pp->port = snum; pp->fastreuse = 0; INIT_HLIST_HEAD(&pp->owner);