瀏覽代碼

Fixed leakage of resources allocated by EXIF library

master
Bert Münnich 10 年之前
父節點
當前提交
f5f49e7a9d
共有 2 個檔案被更改,包括 5 行新增5 行删除
  1. +1
    -1
      Makefile
  2. +4
    -4
      thumbs.c

+ 1
- 1
Makefile 查看文件

@@ -1,4 +1,4 @@
VERSION = git-20141029
VERSION = git-20141031

PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man


+ 4
- 4
thumbs.c 查看文件

@@ -276,10 +276,10 @@ bool tns_load(tns_t *tns, int n, bool force)
char tmppath[] = "/tmp/sxiv-XXXXXX";
Imlib_Image tmpim;

if ((ed = exif_data_new_from_file(file->path)) != NULL &&
ed->data != NULL && ed->size > 0)
{
if ((tmpfd = mkstemp(tmppath)) >= 0) {
if ((ed = exif_data_new_from_file(file->path)) != NULL) {
if (ed->data != NULL && ed->size > 0 &&
(tmpfd = mkstemp(tmppath)) >= 0)
{
err = write(tmpfd, ed->data, ed->size) != ed->size;
close(tmpfd);



Loading…
取消
儲存