From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id 9481558CF for ; Mon, 13 Feb 2017 22:07:37 +0100 (CET) Received: by mail-wr0-f174.google.com with SMTP id k90so158751837wrc.3 for ; Mon, 13 Feb 2017 13:07:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=yckfc6Kg/jgrxSEbPOPo4Jbo3SqYlGdyiz78x58MwgM=; b=QDAWASfog0hfKtyU9OrinfVJI1mt+ubkQpvekT0SnNbnGJyAeZCnBOGXWVpJQqVNPd zrPjr3vMd2AryJtgP2loNGOGgyuQqJPXjFpruNGd/5AxopM3zZdl5Jgwg2FLbl9a5aWl adAm8jNa+ImgjRmrmKhjR5VRU5kvF5K50m8ujKz2gybdY5CzEslC2lPbhRAe7j6u5VLv 3nSSMrREjZ9WBqXr/rGxsQYKt9vgepcRmy83pr2+3nJA1CFEuMKN3L2wJcYKyyBgheMO O4q/txchPyoG3cWwihknHKkCtNVqAiPiirmTx7BfROt06RqOhsYzAMxnd3t8Q4dGBI6Z XJUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=yckfc6Kg/jgrxSEbPOPo4Jbo3SqYlGdyiz78x58MwgM=; b=N/PyqcJIt01nGk6SPr47S84kX4Tee7n15XEii7oJLdODxEi47EBh70/GEF4FgtHJxc +jeq5uDgUjNQEGtozfK+0MwV889gKW3U5YkFnlroBlDLYETNXGhUy79xpuI6LXGdEeQH jhppoWJQRJmqaTUJAzKRMuhJLO7wC2LnrdsMX/BXOJ8Z2svY27HCsh+l9PwuspdaVYqg XUDMCFZVmQNel1llvCeAhgEYxv1ltifsq0g181GbIslGycMgiPi62us8MfgjMXF/Y94/ W1cHCjZmlNIvsZ+IDzuEVowAhFlU+WJS5LCqlbJrH6VAOeEFc0o4lxOYdPFtlQ92BW/L C7/A== X-Gm-Message-State: AMke39mmc2i0GCACAZM32zyNmcUhr781PVdppzL3sJ5yhwrOF9nmYlnriwcx5KIhLPkhUw3E X-Received: by 10.223.160.114 with SMTP id l47mr20584221wrl.73.1487020057330; Mon, 13 Feb 2017 13:07:37 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id 186sm754811wmw.24.2017.02.13.13.07.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Feb 2017 13:07:36 -0800 (PST) From: Thomas Monjalon To: Cristian Dumitrescu Cc: dev@dpdk.org, Dmitriy Yakovlev Date: Mon, 13 Feb 2017 22:07:35 +0100 Message-ID: <1512191.29lNYdtJif@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1486435866-30562-1-git-send-email-bombermag@gmail.com> References: <1486435866-30562-1-git-send-email-bombermag@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] cfgfile: fix uninitialized variable on load error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2017 21:07:37 -0000 Ping Cristian 2017-02-07 05:51, Dmitriy Yakovlev: > Uninitialized scalar variable. Using uninitialized value cfg->sections[curr_section]->num_entries when calling rte_cfgfile_close. > And memory in variables cfg->sections[curr_section], sect->entries[curr_entry] maybe not equal NULL. We must decrement counters curr_section, curr_entry when failed to realloc. > > Fixes: eaafbad419bf ("cfgfile: library to interpret config files") > > Signed-off-by: Dmitriy Yakovlev