From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by rv-out-0910.google.com with SMTP id l15so212960rvb for ; Fri, 05 Oct 2007 18:27:12 -0700 (PDT) Date: Sat, 6 Oct 2007 09:21:25 +0800 From: WANG Cong Subject: Re: [Patch]Documentation/vm/slabinfo.c: clean up this code Message-ID: <20071006012125.GA2436@hacking> Reply-To: WANG Cong References: <20071005124614.GD12498@hacking> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: WANG Cong , LKML , Andrew Morton , linux-mm@kvack.org List-ID: On Fri, Oct 05, 2007 at 12:17:41PM -0700, Christoph Lameter wrote: >On Fri, 5 Oct 2007, WANG Cong wrote: > >> >> This patch does the following cleanups for Documentation/vm/slabinfo.c: >> >> - Fix two memory leaks; > >For user space code? Memory will be released as soon as the program >terminates. Yes, it's of course in user space. But there really exists memory leaks, since strdup(3) uses malloc(3) to allocate memory for new string, we should use free(3) to free the memory, or this memory will be lost. Regards. ;) WANG Cong -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org