From 3ed2a45692c1eadbcbe0c19148dbdd97918306f0 Mon Sep 17 00:00:00 2001 From: bostic Date: Sun, 9 Jan 1994 16:47:16 +0000 Subject: [PATCH] private memory pointer to NULL after free'ing it --- vi/v_init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vi/v_init.c b/vi/v_init.c index b3082bfd..36354235 100644 --- a/vi/v_init.c +++ b/vi/v_init.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "$Id: v_init.c,v 8.17 1993/12/27 17:56:51 bostic Exp $ (Berkeley) $Date: 1993/12/27 17:56:51 $"; +static char sccsid[] = "$Id: v_init.c,v 8.18 1994/01/09 16:47:16 bostic Exp $ (Berkeley) $Date: 1994/01/09 16:47:16 $"; #endif /* not lint */ #include @@ -80,7 +80,10 @@ v_screen_end(sp) if (vip->paragraph != NULL) FREE(vip->paragraph, vip->paragraph_len); + /* Free private memory. */ FREE(vip, sizeof(VI_PRIVATE)); + sp->vi_private = NULL; + return (0); } -- 2.11.4.GIT