Skip to content

Commit

Permalink
SCTP: fix wrong debug counting of datamsg
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and David S. Miller committed Apr 10, 2008
1 parent 2fa7527 commit e8c3875
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sctp/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e8c3875

Please sign in to comment.