From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4302 invoked from network); 20 Feb 2003 08:31:31 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Feb 2003 08:31:31 -0000 Received: (qmail 11139 invoked by alias); 20 Feb 2003 08:31:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18265 Received: (qmail 11126 invoked from network); 20 Feb 2003 08:31:20 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 20 Feb 2003 08:31:20 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [65.206.41.67] by sunsite.dk (MessageWall 1.0.8) with SMTP; 20 Feb 2003 8:31:20 -0000 Received: from gauss.counterexample.org (gauss.counterexample.org [192.168.13.4]) by ns01.counterexample.org (8.11.6/8.11.6) with ESMTP id h1K8VMU19649 for ; Thu, 20 Feb 2003 03:31:22 -0500 Received: (from guthrie@localhost) by gauss.counterexample.org (8.11.6/8.11.6) id h1K8VMQ19431 for zsh-workers@sunsite.dk; Thu, 20 Feb 2003 03:31:22 -0500 Date: Thu, 20 Feb 2003 03:31:22 -0500 From: "John T. Guthrie" Message-Id: <200302200831.h1K8VMQ19431@gauss.counterexample.org> To: zsh-workers@sunsite.dk Subject: Possible ztrdup memory leaks? While going through the code in exec.c, I found the following at line 2876: nam = ztrdup(nam); Correct me if I'm wrong, but would this cause a memory leak? I found two other places in the code where you have something of the form foo=ztrdup(foo): at line 3408 of exec.c and line 330 of init.c. Since ztrdup() uses zalloc(), I wasn't certain if something special needed to be done to fix these leaks. (The first and third of these potential leaks look intuitively easy to fix, but I'm not certain if the second one is really a leak or not.) John Guthrie guthrie@counterexample.org