Skip to contentSkip to conversation

SCTP: fix wrong debug counting of datamsg

PATCH In review Li Zefan 2 participants 2 messages Apr 1, 2008 – Apr 10, 2008

Subsystems (3)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/2 SCTP: fix wrong debug counting of datamsg

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

---
 net/sctp/chunk.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
net/sctp/chunk.c +3 -2
index 4d3128f..099b0af 100644
@@ -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;
 }
 
Signature · 1 line
1.5.4.rc3