Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2018 16:42:11 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335002 - head/usr.bin/diff
Message-ID:  <201806121642.w5CGgBVc099106@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Tue Jun 12 16:42:11 2018
New Revision: 335002
URL: https://svnweb.freebsd.org/changeset/base/335002

Log:
  Fix memory leak
  
  CID:		1393352

Modified:
  head/usr.bin/diff/pr.c

Modified: head/usr.bin/diff/pr.c
==============================================================================
--- head/usr.bin/diff/pr.c	Tue Jun 12 16:40:22 2018	(r335001)
+++ head/usr.bin/diff/pr.c	Tue Jun 12 16:42:11 2018	(r335002)
@@ -117,6 +117,7 @@ stop_pr(struct pr *pr)
 		err(2, "kevent");
 	wstatus = pr->e[0].data;
 	close(pr->kq);
+	free(pr);
 	if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != 0)
 		errx(2, "pr exited abnormally");
 	else if (WIFSIGNALED(wstatus))



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