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>
This commit is contained in:
Li Zefan 2008-04-10 01:57:24 -07:00 committed by David S. Miller
parent 2fa7527ba1
commit e8c38751be
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}