From patchwork Thu Mar 20 08:40:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Nelkenbaum X-Patchwork-Id: 3863851 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 355259F370 for ; Thu, 20 Mar 2014 08:40:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53EE520213 for ; Thu, 20 Mar 2014 08:40:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14CD0201DE for ; Thu, 20 Mar 2014 08:40:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754645AbaCTIkl (ORCPT ); Thu, 20 Mar 2014 04:40:41 -0400 Received: from mail-we0-f171.google.com ([74.125.82.171]:44042 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbaCTIkg (ORCPT ); Thu, 20 Mar 2014 04:40:36 -0400 Received: by mail-we0-f171.google.com with SMTP id t61so331658wes.30 for ; Thu, 20 Mar 2014 01:40:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=He+CnWNZxSh7aDrcMROe6ZB1UAliuHOnbXY2YMO0e70=; b=gJs+v69w4o4BQ3ZoCXZGmXC75qC/U7W/3tTjL/0E0GOw5w2CGXrCmxHXVyImVZot/w Ff7+shPmkp2DjNAjrltsM1YSXfRvYK1m+AB+hd8PTGlImsA0ABVvAZilY3GcWS9MDHea h1AeF1bIPY2UxZPTV+vmVFu8tg0cPRY4FWMjEYPKNSc6Fu89OIpKlo6bgDcavwJ6Q5ad S/B6WfgPxISvcOuvgvm32rmxCUGbKyzrg8AEN9w2a45jy6Oe8cn2QVFC/gG+KX/N1nZL NxQfxSJZ3025J8GZ4U/6Kk8WZC/3c42QAuYCgDgCoEb/G4iTzNtdfAz/IQ0Q61SdAKw5 +73g== X-Gm-Message-State: ALoCoQlScBAp4lfiU+dhZ6DSAJBAAmK2j3emxZRzWQhe6ouDv3FLB3NEKf8WvkBhR4EDKYBzNn/c X-Received: by 10.180.93.133 with SMTP id cu5mr22878687wib.47.1395304835371; Thu, 20 Mar 2014 01:40:35 -0700 (PDT) Received: from [10.223.4.17] (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id ga10sm3088450wjb.23.2014.03.20.01.40.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 01:40:34 -0700 (PDT) Message-ID: <532AA981.9080403@dev.mellanox.co.il> Date: Thu, 20 Mar 2014 10:40:33 +0200 From: Ilya Nelkenbaum User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "linux-rdma@vger.kernel.org" Subject: [PATCH] ibutils/ibis: fix ibis_get_local_ports_info uninitialized variable Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Initialize attr_array before calling osm_vendor_get_all_port_attr Signed-off-by: Eitan Zahavi Signed-off-by: Daniel Klein --- ibis/src/ibis.i | 1 + ibis/src/ibis_wrap.c | 1 + ibis/src/ibissh_wrap.cpp | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/ibis/src/ibis.i b/ibis/src/ibis.i index 8fc4440..28a0912 100644 --- a/ibis/src/ibis.i +++ b/ibis/src/ibis.i @@ -385,6 +385,7 @@ ibisp_is_debug(void) static char res[128]; Tcl_Obj *p_obj; + memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t)); if (!IbisObj.initialized) { Tcl_SetStringObj( diff --git a/ibis/src/ibis_wrap.c b/ibis/src/ibis_wrap.c index 5098c2a..ee97601 100644 --- a/ibis/src/ibis_wrap.c +++ b/ibis/src/ibis_wrap.c @@ -3209,6 +3209,7 @@ typedef struct { static char res[128]; Tcl_Obj *p_obj; + memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t)); if (!IbisObj.initialized) { Tcl_SetStringObj( diff --git a/ibis/src/ibissh_wrap.cpp b/ibis/src/ibissh_wrap.cpp index f75cde6..917904f 100644 --- a/ibis/src/ibissh_wrap.cpp +++ b/ibis/src/ibissh_wrap.cpp @@ -3209,6 +3209,7 @@ typedef struct { static char res[128]; Tcl_Obj *p_obj; + memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t)); if (!IbisObj.initialized) { Tcl_SetStringObj(