From: Allan Stephens Date: Thu, 5 Jun 2008 00:37:59 +0000 (-0700) Subject: tipc: Prevent display of name table types with no publications X-Git-Tag: MMI-PSA29.97-13-9~33552^2~360 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f15d36453bbd02d404445dace49f4ae072f44e5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git tipc: Prevent display of name table types with no publications This patch adds a check to prevent TIPC's name table display code from listing a name type entry if it exists only to hold subscription info, rather than published names. Signed-off-by: Allan Stephens Signed-off-by: David S. Miller --- diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 892373e498e4..4455f13cfaf6 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -905,6 +905,9 @@ static void nameseq_list(struct name_seq *seq, struct print_buf *buf, u32 depth, struct sub_seq *sseq; char typearea[11]; + if (seq->first_free == 0) + return; + sprintf(typearea, "%-10u", seq->type); if (depth == 1) {