bin/69275: [PATCH] tftp memory leak fix

Liam J. Foy liamfoy at sepulcrum.org
Mon Jul 19 04:10:24 PDT 2004


>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 at 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:


More information about the freebsd-bugs mailing list