summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-30 03:24:45 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-30 03:24:45 +0200
commitad1b17d8f170c499a441fe24924f994ccf0b7e74 (patch)
tree8b3588097bddd1bea32a3f666ba7eada930a2063
parent1d5caf587462e4e60e69938d183ba0b2faa1ed0b (diff)
downloadfeh-ad1b17d8f170c499a441fe24924f994ccf0b7e74.zip
Fix memory leaks
-rw-r--r--src/index.c1
-rw-r--r--src/thumbnail.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/index.c b/src/index.c
index 49efc17..580585d 100644
--- a/src/index.c
+++ b/src/index.c
@@ -448,6 +448,7 @@ void get_index_string_dim(feh_file *file, Imlib_Font fn, int *fw, int *fh)
* leading e.g. to a 0x0 report for index_dim = "%n".
*/
if (file == NULL) {
+ fake_file = 1;
file = feh_file_new("foo");
file->info = feh_file_info_new();
}
diff --git a/src/thumbnail.c b/src/thumbnail.c
index 191fc8e..f7a31c6 100644
--- a/src/thumbnail.c
+++ b/src/thumbnail.c
@@ -921,11 +921,14 @@ int feh_thumbnail_setup_thumbnail_dir(void)
weprintf("unable to create %s directory", dir_thumbnails);
}
+ free(dir_thumbnails);
+
if (mkdir(dir, 0700) == -1)
weprintf("unable to create %s directory", dir);
else
status = 1;
}
+ free(dir);
}
return status;