Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2004 12:03:29 +0100
From:      "Liam J. Foy" <liamfoy@sepulcrum.org>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   bin/69275: [PATCH] tftp memory leak fix
Message-ID:  <1090235009.0@liamfoy.ath.cx>
Resent-Message-ID: <200407191110.i6JBANx0022168@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         69275
>Category:       bin
>Synopsis:       [PATCH] tftp memory leak fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 19 11:10:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Liam J. Foy
>Release:        FreeBSD 5.2-RELEASE i386
>Organization:
None 
>Environment:


System: FreeBSD 5.2-RELEASE #4: Sat Jul  3 15:54:48 BST 2004
    liamfoy@liamfoy.ath.cx:/usr/src/sys/i386/compile/Ecthelion



>Description:


The following patch contains a fix for a memory leak within tftp. This was first noticed on the OpenBSD camp.


>How-To-Repeat:





>Fix:


--- /FreeBSD/FreeBSD-current/src/usr.bin/tftp/main.c	2003-10-11 17:27:55.000000000 -0700
+++ main.c	2004-07-19 03:59:11.000000000 -0700
@@ -495,6 +495,7 @@
 		fd = creat(cp, 0644);
 		if (fd < 0) {
 			warn("%s", cp);
+			free(cp);
 			continue;
 		}
 		if (verbose)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1090235009.0>