svn commit: r323496 - head/lib/libstand

Toomas Soome tsoome at FreeBSD.org
Tue Sep 12 13:51:19 UTC 2017


Author: tsoome
Date: Tue Sep 12 13:51:18 2017
New Revision: 323496
URL: https://svnweb.freebsd.org/changeset/base/323496

Log:
  libstand: tftp_open() can leak pkt on error
  
  The memory can be leaked if we will have pkt set and will get an error
  during tftp_open() processing.
  
  Differential Revision:	https://reviews.freebsd.org/D12202

Modified:
  head/lib/libstand/tftp.c

Modified: head/lib/libstand/tftp.c
==============================================================================
--- head/lib/libstand/tftp.c	Tue Sep 12 13:47:54 2017	(r323495)
+++ head/lib/libstand/tftp.c	Tue Sep 12 13:51:18 2017	(r323496)
@@ -467,6 +467,7 @@ tftp_open(const char *path, struct open_file *f)
 
 	if (res) {
 		free(tftpfile->path);
+		free(tftpfile->pkt);
 		free(tftpfile);
 		return (res);
 	}


More information about the svn-src-all mailing list