svn commit: r327265 - head/usr.bin/rpcgen

Warner Losh imp at FreeBSD.org
Thu Dec 28 05:33:33 UTC 2017


Author: imp
Date: Thu Dec 28 05:33:29 2017
New Revision: 327265
URL: https://svnweb.freebsd.org/changeset/base/327265

Log:
  Plug two resource leaks.
  
  CID: 92077, 92074

Modified:
  head/usr.bin/rpcgen/rpc_parse.c
  head/usr.bin/rpcgen/rpc_scan.c

Modified: head/usr.bin/rpcgen/rpc_parse.c
==============================================================================
--- head/usr.bin/rpcgen/rpc_parse.c	Thu Dec 28 05:33:24 2017	(r327264)
+++ head/usr.bin/rpcgen/rpc_parse.c	Thu Dec 28 05:33:29 2017	(r327265)
@@ -93,6 +93,7 @@ get_definition(void)
 		def_const(defp);
 		break;
 	case TOK_EOF:
+		free(defp);
 		return (NULL);
 	default:
 		error("definition keyword expected");

Modified: head/usr.bin/rpcgen/rpc_scan.c
==============================================================================
--- head/usr.bin/rpcgen/rpc_scan.c	Thu Dec 28 05:33:24 2017	(r327264)
+++ head/usr.bin/rpcgen/rpc_scan.c	Thu Dec 28 05:33:29 2017	(r327265)
@@ -490,6 +490,7 @@ docppline(char *line, int *lineno, const char **fname)
 	*p = 0;
 	if (*file == 0) {
 		*fname = NULL;
+		free(file);
 	} else {
 		*fname = file;
 	}


More information about the svn-src-head mailing list