From e2d3bba86c80aa03c09002bd29243d5d86a0a4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Diego=20Aur=C3=A9lio=20Mesquita?= Date: Thu, 9 Nov 2017 18:48:24 -0200 Subject: [PATCH] general: do not free strings gotten from getenv(), to avoid a crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marco Diego Aurélio Mesquita --- src/history.c | 1 - src/rcfile.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/history.c b/src/history.c index ac2f2753..7929d49b 100644 --- a/src/history.c +++ b/src/history.c @@ -271,7 +271,6 @@ bool have_statedir(void) if (xdgdatadir != NULL) { statedir = concatenate(xdgdatadir, "/nano/"); - free(xdgdatadir); } else statedir = concatenate(homedir, XDG_DATA_FALLBACK "/nano/"); diff --git a/src/rcfile.c b/src/rcfile.c index c43a286f..877936a4 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1258,7 +1258,6 @@ void do_rcfiles(void) check_vitals_mapped(); - free(xdgconfdir); free(nanorc); }