Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Dec 2015 15:30:26 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292606 - head/usr.sbin/cron/crontab
Message-ID:  <201512221530.tBMFUQ3b052341@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Tue Dec 22 15:30:26 2015
New Revision: 292606
URL: https://svnweb.freebsd.org/changeset/base/292606

Log:
  crontab: properly free an entry
  
  This should close memory leak.
  
  Obtained from:	OpenBSD (rev. 1.62)
  CID:		271773

Modified:
  head/usr.sbin/cron/crontab/crontab.c

Modified: head/usr.sbin/cron/crontab/crontab.c
==============================================================================
--- head/usr.sbin/cron/crontab/crontab.c	Tue Dec 22 15:20:08 2015	(r292605)
+++ head/usr.sbin/cron/crontab/crontab.c	Tue Dec 22 15:30:26 2015	(r292606)
@@ -558,7 +558,7 @@ replace_cmd() {
 		case FALSE:
 			e = load_entry(tmp, check_error, pw, envp);
 			if (e)
-				free(e);
+				free_entry(e);
 			break;
 		case TRUE:
 			break;



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