From owner-cvs-all Wed Jul 18 4:48:10 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A1EF837B406; Wed, 18 Jul 2001 04:48:04 -0700 (PDT) (envelope-from dd@FreeBSD.org) Received: (from dd@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6IBm4a41403; Wed, 18 Jul 2001 04:48:04 -0700 (PDT) (envelope-from dd) Message-Id: <200107181148.f6IBm4a41403@freefall.freebsd.org> From: Dima Dorfman Date: Wed, 18 Jul 2001 04:48:00 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.sbin/cron/lib entry.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG dd 2001/07/18 04:48:00 PDT Modified files: usr.sbin/cron/lib entry.c Log: free_entry(): Don't free e->envp if it's already NULL; likewise for e->cmd. free_entry() now does the right thing with partially-initialized structures. load_entry(): Don't call env_free() on e->envp throughout the routine before jumping to eof; the free_entry() call at that label will take care of it. The previous behavior resulted in e->envp being free'd twice (well, the second time would usually result in a crash, but that's besides the point); once in load_entry(), and once in free_entry() after the former called the latter. Also note that the check added to free_entry() (above) doesn't help, since e->envp wasn't reset to NULL after env_free(). Submitted by: Mark Peek Revision Changes Path 1.13 +5 -5 src/usr.sbin/cron/lib/entry.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message