diff options
author | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2011-02-25 01:31:13 +0000 |
---|---|---|
committer | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2011-02-25 01:31:13 +0000 |
commit | 26c943816db905a2e31423244a283b000e9d76d3 (patch) | |
tree | c84a04684983c1cca18a692ebd4e9b216aa9a457 /branches | |
parent | f0ec92ed75d8304158ec6058eb99bca43e5fec56 (diff) |
Correct memory allocation failure messages
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@447 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'branches')
-rw-r--r-- | branches/1.1.x/turbojpegl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/branches/1.1.x/turbojpegl.c b/branches/1.1.x/turbojpegl.c index 464cf04..94af6d7 100644 --- a/branches/1.1.x/turbojpegl.c +++ b/branches/1.1.x/turbojpegl.c @@ -517,7 +517,7 @@ DLLEXPORT int DLLCALL tjDecompress(tjhandle h, th[i]=compptr->v_samp_factor*DCTSIZE; tmpbufsize+=iw[i]*th[i]; if((outbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ch[i]))==NULL) - _throw("Memory allocation failed in tjInitDecompress()"); + _throw("Memory allocation failed in tjDecompress()"); for(row=0; row<ch[i]; row++) { outbuf[i][row]=ptr; @@ -527,13 +527,13 @@ DLLEXPORT int DLLCALL tjDecompress(tjhandle h, if(usetmpbuf) { if((_tmpbuf=(JSAMPLE *)malloc(sizeof(JSAMPLE)*tmpbufsize))==NULL) - _throw("Memory allocation failed in tjInitDecompress()"); + _throw("Memory allocation failed in tjDecompress()"); ptr=_tmpbuf; for(i=0; i<dinfo->num_components; i++) { jpeg_component_info *compptr=&dinfo->comp_info[i]; if((tmpbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*th[i]))==NULL) - _throw("Memory allocation failed in tjInitDecompress()"); + _throw("Memory allocation failed in tjDecompress()"); for(row=0; row<th[i]; row++) { tmpbuf[i][row]=ptr; @@ -545,7 +545,7 @@ DLLEXPORT int DLLCALL tjDecompress(tjhandle h, else { if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*height))==NULL) - _throw("Memory allocation failed in tjInitDecompress()"); + _throw("Memory allocation failed in tjDecompress()"); for(i=0; i<height; i++) { if(flags&TJ_BOTTOMUP) row_pointer[i]= &dstbuf[(height-i-1)*pitch]; |