Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 77529 invoked from network); 2 Nov 2005 21:24:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Nov 2005 21:24:00 -0000 Received: (qmail 96698 invoked by uid 500); 2 Nov 2005 21:23:56 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 96641 invoked by uid 500); 2 Nov 2005 21:23:56 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 96630 invoked by uid 99); 2 Nov 2005 21:23:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 13:23:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of apache-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 13:23:51 -0800 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1EXQ1t-0004XD-Fd for dev@httpd.apache.org; Wed, 02 Nov 2005 22:20:21 +0100 Received: from aorleans-151-1-57-107.w83-199.abo.wanadoo.fr ([83.199.175.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Nov 2005 22:20:21 +0100 Received: from christophe.jaillet by aorleans-151-1-57-107.w83-199.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Nov 2005 22:20:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@httpd.apache.org From: "Christophe Jaillet" Subject: Potential memory leak in /modules/cache/mod_mem_cache.c Date: Wed, 2 Nov 2005 21:58:54 +0100 Lines: 21 Message-ID: X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: aorleans-151-1-57-107.w83-199.abo.wanadoo.fr X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Comments agains httpd-2.1.8-beta ================================= In file mod_mem_cache.c (/modules/cache) around line 558, there is a malloc (*obj). A few lines later, another malloc (buf) is performed. If the second malloc fails, then we have (*obj = NULL) but I don't see anyway to free the memory allocated. I would have imagined something like free (*obj); *obj = NULL; Unless, as a newbie in apache, there is something I don't know about memory management in apache... Christophe JAILLET