From 9ae593bb3652a9a799a6fff55debb747dbd193f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Go=C5=82aszewski?= Date: Tue, 13 Sep 2011 08:13:26 +0000 Subject: [PATCH] - rel.2 - non_memleak patch added. Fixes memory leak caused by not-a-real-memleak. Changed files: feh-non_memleak.patch -> 1.1 feh.spec -> 1.70 --- feh-non_memleak.patch | 19 +++++++++++++++++++ feh.spec | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 feh-non_memleak.patch diff --git a/feh-non_memleak.patch b/feh-non_memleak.patch new file mode 100644 index 0000000..96a8f04 --- /dev/null +++ b/feh-non_memleak.patch @@ -0,0 +1,19 @@ +--- ./src/imlib.c.org 2011-09-13 10:09:21.351470521 +0200 ++++ ./src/imlib.c 2011-09-13 10:09:38.442241678 +0200 +@@ -151,13 +151,14 @@ int feh_load_image(Imlib_Image * im, feh + /* Http, no reload, slideshow. Let's keep this image on hand... */ + free(file->filename); + file->filename = estrdup(tmpname); ++ ++ if (!opt.keep_http) ++ add_file_to_rm_filelist(tmpname); + } else { + /* Don't cache the image if we're doing reload + http (webcams etc) */ + if (!opt.keep_http) + unlink(tmpname); + } +- if (!opt.keep_http) +- add_file_to_rm_filelist(tmpname); + free(tmpname); + } else { + *im = imlib_load_image_with_error_return(file->filename, &err); diff --git a/feh.spec b/feh.spec index 5360f84..48be549 100644 --- a/feh.spec +++ b/feh.spec @@ -3,13 +3,14 @@ Summary(hu.UTF-8): Gyors képnézegető/indexelő/montázsoló Summary(pl.UTF-8): Szybki program do przeglądania/indeksowania/montowania obrazów Name: feh Version: 1.16.1 -Release: 1 +Release: 2 License: BSD Group: X11/Applications/Graphics Source0: https://derf.homelinux.org/~derf/projects/feh/%{name}-%{version}.tar.bz2 # Source0-md5: 1bb080c7b0021db50884a52161251990 URL: http://feh.finalrewind.org/ Patch0: %{name}-install.patch +Patch1: %{name}-non_memleak.patch Source1: %{name}-bash-completion BuildRequires: giblib-devel >= 1.2.4 BuildRequires: imlib2-devel >= 1.0.0 @@ -65,6 +66,7 @@ bashowe dopełnianie linii poleceń programu feh. %prep %setup -q %patch0 -p1 +%patch1 -p1 %{__sed} -i "s,CFLAGS ?=.*,CFLAGS = %{rpmcflags}," config.mk %build -- 2.43.0