add cmake option WITH_SYSTEM_OPENJPEG so linux can build cycles without having libope...
[blender.git] / extern / libopenjpeg / image.c
index ea8e59ea547ab91d12b538d1ff8bf889e3ce241d..7c1e7f7faa2639c65143e58156778524e2224c3e 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2005, Hervé Drolon, FreeImage Team
+ * Copyright (c) 2005, Herve Drolon, FreeImage Team
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
 #include "opj_includes.h"
 
 opj_image_t* opj_image_create0(void) {
 #include "opj_includes.h"
 
 opj_image_t* opj_image_create0(void) {
-       opj_image_t *image = (opj_image_t*)opj_malloc(sizeof(opj_image_t));
+       opj_image_t *image = (opj_image_t*)opj_calloc(1, sizeof(opj_image_t));
        return image;
 }
 
        return image;
 }
 
@@ -86,4 +86,3 @@ void OPJ_CALLCONV opj_image_destroy(opj_image_t *image) {
                opj_free(image);
        }
 }
                opj_free(image);
        }
 }
-