From: Li Zefan Date: Thu, 10 Apr 2008 08:57:24 +0000 (-0700) Subject: SCTP: fix wrong debug counting of datamsg X-Git-Tag: firefly_0821_release~21615^2~147 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e8c38751be84e2e930642be60331fbb6d3c4becb;p=firefly-linux-kernel-4.4.55.git SCTP: fix wrong debug counting of datamsg Should not count it if the allocation of this object failed. Signed-off-by: Li Zefan Signed-off-by: David S. Miller --- diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index ed857643e3ff..1748ef90950c 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c @@ -66,9 +66,10 @@ SCTP_STATIC struct sctp_datamsg *sctp_datamsg_new(gfp_t gfp) { struct sctp_datamsg *msg; msg = kmalloc(sizeof(struct sctp_datamsg), gfp); - if (msg) + if (msg) { sctp_datamsg_init(msg); - SCTP_DBG_OBJCNT_INC(datamsg); + SCTP_DBG_OBJCNT_INC(datamsg); + } return msg; }