From 6265353e8d41a4158aa72d2c7711a8eee697d45f Mon Sep 17 00:00:00 2001 From: marcel Date: Sun, 16 Feb 2014 20:02:29 +0000 Subject: [PATCH] MFC r259056: Fix r203922 for "fortune -o". git-svn-id: svn://svn.freebsd.org/base/stable/10@261994 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- games/fortune/fortune/fortune.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c index d5ce1b9c8..4b2ffa750 100644 --- a/games/fortune/fortune/fortune.c +++ b/games/fortune/fortune/fortune.c @@ -486,7 +486,7 @@ add_file(int percent, const char *file, const char *dir, FILEDESC **head, if (Offend) { if (was_malloc) free(tpath); - path = offensive; + path = tpath = offensive; offensive = NULL; was_malloc = TRUE; DPRINTF(1, (stderr, "\ttrying \"%s\"\n", path)); @@ -508,7 +508,7 @@ over: if (All_forts && offensive != NULL) { if (was_malloc) free(tpath); - path = offensive; + path = tpath = offensive; offensive = NULL; was_malloc = TRUE; DPRINTF(1, (stderr, "\ttrying \"%s\"\n", path)); -- 2.42.0