浏览代码

jpeg.c: fix a huge resource leak in the error codepath of the JPEG codec.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3414 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 15 年前
父节点
当前提交
f025663d4a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      pipi/codec/jpeg.c

+ 3
- 3
pipi/codec/jpeg.c 查看文件

@@ -68,13 +68,13 @@ pipi_image_t *pipi_load_jpeg(const char *name)
unsigned int i, j, k = 0;
FILE *fp;

if(setjmp(jerr.setjmp_buffer))
return NULL;

fp = fopen(name, "rb");
if(!fp)
return NULL;

if(setjmp(jerr.setjmp_buffer))
goto end;

cinfo.err = jpeg_std_error(&jerr.pub);
jerr.pub.error_exit = error_msg;
jerr.pub.emit_message = emit_msg;


正在加载...
取消
保存