Message ID | 1478143935-5564-1-git-send-email-tang.wenji@zte.com.cn (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show
Return-Path: <dm-devel-bounces@redhat.com> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F0186022E for <patchwork-dm-devel@patchwork.kernel.org>; Thu, 3 Nov 2016 03:35:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81DF22A6C9 for <patchwork-dm-devel@patchwork.kernel.org>; Thu, 3 Nov 2016 03:35:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75AE12A718; Thu, 3 Nov 2016 03:35:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E8472A6C9 for <patchwork-dm-devel@patchwork.kernel.org>; Thu, 3 Nov 2016 03:35:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id uA33Xob2010785; Wed, 2 Nov 2016 23:33:51 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id uA33XmYu003047 for <dm-devel@listman.util.phx.redhat.com>; Wed, 2 Nov 2016 23:33:48 -0400 Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uA33XmXQ015500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Nov 2016 23:33:48 -0400 Received: from zte.com.cn (mx7.zte.com.cn [202.103.147.169]) by mx1.redhat.com (Postfix) with ESMTP id DAC1A67338; Thu, 3 Nov 2016 03:33:43 +0000 (UTC) Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Websense Email Security Gateway with ESMTP id C06C73FD188B6; Thu, 3 Nov 2016 11:33:33 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id uA33XBWT059198; Thu, 3 Nov 2016 11:33:11 +0800 (GMT-8) (envelope-from tang.wenji@zte.com.cn) Received: from localhost.localdomain ([10.118.202.203]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2016110311331578-2998289 ; Thu, 3 Nov 2016 11:33:15 +0800 From: tang.wenji@zte.com.cn To: Christophe Varoqui <christophe.varoqui@opensvc.com> Date: Thu, 3 Nov 2016 11:32:15 +0800 Message-Id: <1478143935-5564-1-git-send-email-tang.wenji@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2016-11-03 11:33:16, Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2016-11-03 11:33:11, Serialize complete at 2016-11-03 11:33:11 X-MAIL: mse01.zte.com.cn uA33XBWT059198 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 191 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 03 Nov 2016 03:33:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 03 Nov 2016 03:33:45 +0000 (UTC) for IP:'202.103.147.169' DOMAIN:'mx7.zte.com.cn' HELO:'zte.com.cn' FROM:'tang.wenji@zte.com.cn' RCPT:'' X-RedHat-Spam-Score: -4.216 (BAYES_50, DCC_REPUT_00_12, RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS) 202.103.147.169 mx7.zte.com.cn 202.103.147.169 mx7.zte.com.cn <tang.wenji@zte.com.cn> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-loop: dm-devel@redhat.com Cc: zhang.kai16@zte.com.cn, dm-devel@redhat.com, "tang.wenji" <tang.wenji@zte.com.cn> Subject: [dm-devel] [PATCH] mpathpersist:check variable 'conf' before using it X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development <dm-devel.redhat.com> List-Unsubscribe: <https://www.redhat.com/mailman/options/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=unsubscribe> List-Archive: <https://www.redhat.com/archives/dm-devel> List-Post: <mailto:dm-devel@redhat.com> List-Help: <mailto:dm-devel-request@redhat.com?subject=help> List-Subscribe: <https://www.redhat.com/mailman/listinfo/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/mpathpersist/main.c b/mpathpersist/main.c index 8e8cc35..5863082 100644 --- a/mpathpersist/main.c +++ b/mpathpersist/main.c @@ -105,6 +105,11 @@ int main (int argc, char * argv[]) udev = udev_new(); conf = mpath_lib_init(udev); + if(!conf) { + udev_unref(udev); + exit(1); + } + memset(transportids, 0, MPATH_MX_TIDS * sizeof(struct transportid)); multipath_conf = conf;