Commit e8c38751be84e2e930642be60331fbb6d3c4becb

Authored by Li Zefan
Committed by David S. Miller
1 parent 2fa7527ba1

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>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

... ... @@ -66,9 +66,10 @@
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