Prevent double free of namelogfile

This commit is contained in:
wangchen2020 2021-03-17 17:38:06 +08:00
parent 0d7b958b52
commit 36ac1d5b50
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 520e5c6ea36289c3cc978bd0e8c86cf0a14bc4b7 Mon Sep 17 00:00:00 2001
From: Mark Nudelman <markn@greenwoodsoftware.com>
Date: Sun, 19 Jan 2020 09:29:37 -0800
Subject: [PATCH] Remove erroneous free() in use_logfile.
---
edit.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/edit.c b/edit.c
index 0cc5697..3676971 100644
--- a/edit.c
+++ b/edit.c
@@ -847,7 +847,6 @@ loop:
/*
* Don't do anything.
*/
- free(filename);
return;
case 'q':
quit(QUIT_OK);
--
1.8.3.1

View File

@ -1,12 +1,13 @@
Name: less
Version: 551
Release: 4
Release: 5
Summary: Less is a pager that displays text files.
License: GPLv3+ or BSD
URL: http://www.greenwoodsoftware.com/less
Source0: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
Patch0: less-394-time.patch
Patch1: less-418-fsync.patch
Patch2: backport-Remove-erroneous-free-in-use_logfile.patch
BuildRequires: git gcc make ncurses-devel autoconf automake libtool
%description
@ -44,6 +45,9 @@ autoreconf -ivf
%{_mandir}/man1/*
%changelog
* Wed Mar 17 2021 wangchen<wangchen137@huawei.com> - 551-5
- Prevent double free of namelogfile
* Tue Aug 18 2020 smileknife<jackshan2010@aliyun.com> - 551-4
- update release for rebuilding