Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8c38751 authored by Li Zefan's avatar Li Zefan Committed by David S. Miller
Browse files

SCTP: fix wrong debug counting of datamsg



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

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2fa7527b
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -66,9 +66,10 @@ SCTP_STATIC struct sctp_datamsg *sctp_datamsg_new(gfp_t gfp)
{
{
	struct sctp_datamsg *msg;
	struct sctp_datamsg *msg;
	msg = kmalloc(sizeof(struct sctp_datamsg), gfp);
	msg = kmalloc(sizeof(struct sctp_datamsg), gfp);
	if (msg)
	if (msg) {
		sctp_datamsg_init(msg);
		sctp_datamsg_init(msg);
		SCTP_DBG_OBJCNT_INC(datamsg);
		SCTP_DBG_OBJCNT_INC(datamsg);
	}
	return msg;
	return msg;
}
}