Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S977059AbdDXTv6 (ORCPT ); Mon, 24 Apr 2017 15:51:58 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:56836 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S975399AbdDXTvs (ORCPT ); Mon, 24 Apr 2017 15:51:48 -0400 Date: Mon, 24 Apr 2017 15:51:45 -0400 (EDT) Message-Id: <20170424.155145.1355712525746160380.davem@davemloft.net> To: bianpan2016@163.com Cc: jon.maloy@ericsson.com, ying.xue@windriver.com, netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] tipc: check return value of nlmsg_new From: David Miller In-Reply-To: <1492931359-25004-1-git-send-email-bianpan2016@163.com> References: <1492931359-25004-1-git-send-email-bianpan2016@163.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 24 Apr 2017 12:10:23 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 428 Lines: 12 From: Pan Bian Date: Sun, 23 Apr 2017 15:09:19 +0800 > Function nlmsg_new() will return a NULL pointer if there is no enough > memory, and its return value should be checked before it is used. > However, in function tipc_nl_node_get_monitor(), the validation of the > return value of function nlmsg_new() is missed. This patch fixes the > bug. > > Signed-off-by: Pan Bian Applied.