From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix invalid memory read as reported by valgrind Date: Fri, 27 Jun 2014 02:56:48 +0200 Message-ID: <4288998.3pALjXkCDh@xps13> References: <1403794474-17695-1-git-send-email-aaron@arbor.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Aaron Campbell Return-path: In-Reply-To: <1403794474-17695-1-git-send-email-aaron-rd7evPjynkNeoWH0uzbU5w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-06-26 10:54, Aaron Campbell: > ==29880== Invalid read of size 1 > ==29880== at 0x56FF9A5: cpu_socket_id (eal_lcore.c:101) > ==29880== by 0x56FFAE9: rte_eal_cpu_init (eal_lcore.c:168) > ==29880== by 0x56F944A: rte_eal_init (eal.c:975) > > The problem is that endptr points to memory allocated underneath the DIR > handle, which has already been freed. So move the closedir() call lower. > > Signed-off-by: Aaron Campbell Good catch! Acked-by: Thomas Monjalon Applied for version 1.7.0. Thanks -- Thomas