diff --git a/LICENSE.md b/LICENSE.md index 5ca512b3..99c9aadc 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -91,7 +91,7 @@ best of our understanding. The Modified (3-clause) BSD License =================================== -Copyright (C)2009-2019 D. R. Commander. All Rights Reserved. +Copyright (C)2009-2020 D. R. Commander. All Rights Reserved. Copyright (C)2015 Viktor Szathmáry. All Rights Reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/html/group___turbo_j_p_e_g.html b/doc/html/group___turbo_j_p_e_g.html index cef856a7..5d67d78a 100644 --- a/doc/html/group___turbo_j_p_e_g.html +++ b/doc/html/group___turbo_j_p_e_g.html @@ -2078,7 +2078,7 @@ If you choose option 1, *jpegSize should be set to the size of your

You should always use this function to free JPEG destination buffer(s) that were automatically (re)allocated by the compression and transform functions or that were manually allocated using tjAlloc().

Parameters
- +
bufferaddress of the buffer to free
bufferaddress of the buffer to free. If the address is NULL, then this function has no effect.
diff --git a/jversion.h b/jversion.h index 191fb6bb..ab4a2c57 100644 --- a/jversion.h +++ b/jversion.h @@ -4,7 +4,7 @@ * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding. * libjpeg-turbo Modifications: - * Copyright (C) 2010, 2012-2019, D. R. Commander. + * Copyright (C) 2010, 2012-2020, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * @@ -36,7 +36,7 @@ */ #define JCOPYRIGHT \ - "Copyright (C) 2009-2019 D. R. Commander\n" \ + "Copyright (C) 2009-2020 D. R. Commander\n" \ "Copyright (C) 2011-2016 Siarhei Siamashka\n" \ "Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \ "Copyright (C) 2015 Intel Corporation\n" \ @@ -49,4 +49,4 @@ "Copyright (C) 1991-2016 Thomas G. Lane, Guido Vollbeding" #define JCOPYRIGHT_SHORT \ - "Copyright (C) 1991-2019 The libjpeg-turbo Project and many others" + "Copyright (C) 1991-2020 The libjpeg-turbo Project and many others" diff --git a/tjbench.c b/tjbench.c index 228e7efe..faad9784 100644 --- a/tjbench.c +++ b/tjbench.c @@ -489,7 +489,7 @@ static int fullTest(unsigned char *srcBuf, int w, int h, int subsamp, } else if (quiet == 1) printf("N/A\n"); for (i = 0; i < ntilesw * ntilesh; i++) { - if (jpegBuf[i]) tjFree(jpegBuf[i]); + tjFree(jpegBuf[i]); jpegBuf[i] = NULL; } free(jpegBuf); jpegBuf = NULL; @@ -505,7 +505,7 @@ bailout: if (file) fclose(file); if (jpegBuf) { for (i = 0; i < ntilesw * ntilesh; i++) - if (jpegBuf[i]) tjFree(jpegBuf[i]); + tjFree(jpegBuf[i]); } free(jpegBuf); free(yuvBuf); @@ -699,7 +699,7 @@ static int decompTest(char *fileName) } } else { if (quiet == 1) printf("N/A N/A "); - if (jpegBuf[0]) tjFree(jpegBuf[0]); + tjFree(jpegBuf[0]); jpegBuf[0] = NULL; decompsrc = 1; } @@ -714,7 +714,7 @@ static int decompTest(char *fileName) } else if (quiet == 1) printf("N/A\n"); for (i = 0; i < ntilesw * ntilesh; i++) { - if (jpegBuf[i]) tjFree(jpegBuf[i]); + tjFree(jpegBuf[i]); jpegBuf[i] = NULL; } free(jpegBuf); jpegBuf = NULL; @@ -727,7 +727,7 @@ bailout: if (file) fclose(file); if (jpegBuf) { for (i = 0; i < ntilesw * ntilesh; i++) - if (jpegBuf[i]) tjFree(jpegBuf[i]); + tjFree(jpegBuf[i]); } free(jpegBuf); free(jpegSize); @@ -1022,6 +1022,6 @@ int main(int argc, char *argv[]) } bailout: - if (srcBuf) tjFree(srcBuf); + tjFree(srcBuf); return retval; } diff --git a/tjexample.c b/tjexample.c index 001ea499..ef32c939 100644 --- a/tjexample.c +++ b/tjexample.c @@ -388,9 +388,9 @@ int main(int argc, char **argv) } bailout: - if (imgBuf) tjFree(imgBuf); + tjFree(imgBuf); if (tjInstance) tjDestroy(tjInstance); - if (jpegBuf) tjFree(jpegBuf); + tjFree(jpegBuf); if (jpegFile) fclose(jpegFile); return retval; } diff --git a/tjunittest.c b/tjunittest.c index 546e5c72..f59939fd 100644 --- a/tjunittest.c +++ b/tjunittest.c @@ -550,7 +550,7 @@ static void doTest(int w, int h, const int *formats, int nformats, int subsamp, bailout: if (chandle) tjDestroy(chandle); if (dhandle) tjDestroy(dhandle); - if (dstBuf) tjFree(dstBuf); + tjFree(dstBuf); } @@ -666,7 +666,7 @@ static void bufSizeTest(void) bailout: free(srcBuf); - if (dstBuf) tjFree(dstBuf); + tjFree(dstBuf); if (handle) tjDestroy(handle); } @@ -839,7 +839,7 @@ static int doBmpTest(const char *ext, int width, int align, int height, int pf, unlink(filename); bailout: - if (buf) tjFree(buf); + tjFree(buf); if (exitStatus < 0) return exitStatus; return retval; } diff --git a/turbojpeg.h b/turbojpeg.h index 9c0a3713..074f015f 100644 --- a/turbojpeg.h +++ b/turbojpeg.h @@ -1,5 +1,5 @@ /* - * Copyright (C)2009-2015, 2017 D. R. Commander. All Rights Reserved. + * Copyright (C)2009-2015, 2017, 2020 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -1636,7 +1636,8 @@ DLLEXPORT int tjSaveImage(const char *filename, unsigned char *buffer, * (re)allocated by the compression and transform functions or that were * manually allocated using #tjAlloc(). * - * @param buffer address of the buffer to free + * @param buffer address of the buffer to free. If the address is NULL, then + * this function has no effect. * * @sa tjAlloc() */