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: v2.6.27-rc1~969^2~359 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f15d36453bbd02d404445dace49f4ae072f44e5;p=linux-2.6 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 892373e498..4455f13cfa 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) {