From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Problem report #45 Date: Sun, 30 Apr 2006 09:43:53 -0700 Message-ID: <200604301643.k3UGhro1029011@scanner2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146417122 29348 80.91.229.2 (30 Apr 2006 17:12:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2006 17:12:02 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 30 19:12:01 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaFSi-0000fw-Br for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 19:12:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaFSh-0005At-O8 for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 13:11:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaFQc-0003jj-R6 for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:09:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaFQZ-0003hB-Rq for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:09:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaFQZ-0003h7-Jx for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:09:47 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaFUC-0007x0-G9 for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:13:32 -0400 Original-Received: from vino.ics.uci.edu (vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.13.6/8.13.5) with ESMTP id k3UGhro1029011 for ; Sun, 30 Apr 2006 09:43:53 -0700 (PDT) Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 75 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-1.286, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_CP 0.08, TW_XR 0.08) X-ICS-MailScanner-From: dann@vino.ics.uci.edu X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53678 Archived-At: CID: 45 Checker: RESOURCE_LEAK (help) File: emacs/lib-src/etags.c Function: Erlang_functions Description: Returned without freeing storage "last" 5575 static void 5576 Erlang_functions (inf) 5577 FILE *inf; 5578 { 5579 char *cp, *last; 5580 int len; 5581 int allocated; 5582 5583 allocated = 0; 5584 len = 0; 5585 last = NULL; 5586 At conditional (1): "feof == 0" taking true path At conditional (2): "((readline), (cp = (lb).buffer)), (1 != 0)" taking true path At conditional (4): "feof == 0" taking false path 5587 LOOP_ON_INPUT_LINES (inf, lb, cp) 5588 { At conditional (3): "*(cp + 0) == 0" taking true path 5589 if (cp[0] == '\0') /* Empty line */ 5590 continue; 5591 else if (iswhite (cp[0])) /* Not function nor attribute */ 5592 continue; 5593 else if (cp[0] == '%') /* comment */ 5594 continue; 5595 else if (cp[0] == '"') /* Sometimes, strings start in column one */ 5596 continue; 5597 else if (cp[0] == '-') /* attribute, e.g. "-define" */ 5598 { 5599 erlang_attribute (cp); 5600 last = NULL; 5601 } Event pass_arg: Variable "last" not freed or pointed-to in function "erlang_func" [model] Also see events: [alloc_fn][var_assign][pass_arg][leaked_storage] 5602 else if ((len = erlang_func (cp, last)) > 0) 5603 { 5604 /* 5605 * Function. Store the function name so that we only 5606 * generates a tag for the first clause. 5607 */ 5608 if (last == NULL) Event alloc_fn: Called allocation function "xmalloc" [model] Event var_assign: Assigned variable "last" to storage returned from "xmalloc" Also see events: [var_assign][pass_arg][pass_arg][leaked_storage] 5609 last = xnew (len + 1, char); 5610 else if (len + 1 > allocated) 5611 xrnew (last, len + 1, char); 5612 allocated = len + 1; Event pass_arg: Variable "last" not freed or pointed-to in function "strncpy" Also see events: [alloc_fn][var_assign][pass_arg][leaked_storage] 5613 strncpy (last, cp, len); 5614 last[len] = '\0'; 5615 } 5616 } Event leaked_storage: Returned without freeing storage "last" Also see events: [alloc_fn][var_assign][pass_arg][pass_arg] 5617 }