mirror of
https://github.com/torvalds/linux
synced 2024-09-06 09:51:23 +00:00
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:
parent
2fa7527ba1
commit
e8c38751be
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue