Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932438AbaGOJVe (ORCPT ); Tue, 15 Jul 2014 05:21:34 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:27539 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757853AbaGOJVb (ORCPT ); Tue, 15 Jul 2014 05:21:31 -0400 Date: Tue, 15 Jul 2014 12:21:00 +0300 From: Dan Carpenter To: DaeSeok Youn Cc: devel , Lidza Louina , driverdev-devel@linuxdriverproject.org, linux-kernel , Greg KH Subject: Re: [PATCH 8/8] staging: dgap: fix memory leak in dgap_parsefile() Message-ID: <20140715092059.GW25880@mwanda> References: <20140715030456.GA14420@devel.8.8.4.4> <20140715065116.GS25880@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 15, 2014 at 06:05:35PM +0900, DaeSeok Youn wrote: > 2014-07-15 15:51 GMT+09:00 Dan Carpenter : > > On Tue, Jul 15, 2014 at 12:05:14PM +0900, Daeseok Youn wrote: > >> The p->u.board.status is allocated and set a string as > >> "No" once within allocating a node of BNODE type. > >> But it also set again with kstrdup() in case of "STATUS" > >> or "ID". If it is not allocated yet, use kstrdup(). > >> If not, use just memcpy(). > > > > I don't think a 2 char buffer is always large enough to hold the new > > strings. > > > > Just free it and allocate again. > Yes, I will send this again. > Actually, please just send the whole set again. I really want Mark on the CC list so he's reviewing these. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/