Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-13 09:43:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-13 09:43:35 +0400
commit8a40444d6bedb6d725c0f84d2088ae0791dafebb (patch)
treef7fcd25848344fc03440b068047547de26fecec7
parent32586e6805dea4af46955a86b102989992b7e24c (diff)
fix bad uses of sizeof() with memory allocation.
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c2
-rw-r--r--source/blender/blenkernel/intern/movieclip.c2
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index 82410d56c52..e68f87211eb 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -530,7 +530,7 @@ static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size)
if (1) {
/* now convert linknodes into arrays for faster per pixel access */
- unsigned int **buckets_face = MEM_mallocN(bucket_tot * sizeof(unsigned int **), __func__);
+ unsigned int **buckets_face = MEM_mallocN(bucket_tot * sizeof(*buckets_face), __func__);
unsigned int bucket_index;
for (bucket_index = 0; bucket_index < bucket_tot; bucket_index++) {
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index d062f302379..ef3b7ca0bdf 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -440,7 +440,7 @@ static void *moviecache_getprioritydata(void *key_v)
MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey *) key_v;
MovieClipCachePriorityData *priority_data;
- priority_data = MEM_callocN(sizeof(priority_data), "movie cache clip priority data");
+ priority_data = MEM_callocN(sizeof(*priority_data), "movie cache clip priority data");
priority_data->framenr = key->framenr;
return priority_data;
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index 8f124bf0181..2696a3e156b 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -242,7 +242,7 @@ static DerivedMesh *applyModifier(
unsigned int *new_edge_arr = NULL;
STACK_DECLARE(new_edge_arr);
- unsigned int *old_vert_arr = MEM_callocN(sizeof(old_vert_arr) * (size_t)numVerts, "old_vert_arr in solidify");
+ unsigned int *old_vert_arr = MEM_callocN(sizeof(*old_vert_arr) * (size_t)numVerts, "old_vert_arr in solidify");
unsigned int *edge_users = NULL;
char *edge_order = NULL;