Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SCTP: fix wrong debug counting of datamsg

Should not count it if the allocation of this object
failed.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Li Zefan and committed by
David S. Miller
e8c38751 2fa7527b

+3 -2
+3 -2
net/sctp/chunk.c
··· 66 66 { 67 67 struct sctp_datamsg *msg; 68 68 msg = kmalloc(sizeof(struct sctp_datamsg), gfp); 69 - if (msg) 69 + if (msg) { 70 70 sctp_datamsg_init(msg); 71 - SCTP_DBG_OBJCNT_INC(datamsg); 71 + SCTP_DBG_OBJCNT_INC(datamsg); 72 + } 72 73 return msg; 73 74 } 74 75