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:
authorTon Roosendaal <ton@blender.org>2005-04-17 22:00:33 +0400
committerTon Roosendaal <ton@blender.org>2005-04-17 22:00:33 +0400
commitd34acbfe44b552f6416619568ea1ea851ef3ebd7 (patch)
tree7a10356c8db5898eaffc120c7874a0276d02e8bb /source/blender/src/playanim.c
parent425f2956043fb9da71bfa34086d923cda4b0e9c2 (diff)
Replaced a bunch of malloc() calls with proper MEM_mallocN()
(and free() and calloc() of course) Remainder malloc() calls need to be there for realloc().
Diffstat (limited to 'source/blender/src/playanim.c')
-rw-r--r--source/blender/src/playanim.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/playanim.c b/source/blender/src/playanim.c
index c9b125f10cc..0e4f0bd58e9 100644
--- a/source/blender/src/playanim.c
+++ b/source/blender/src/playanim.c
@@ -249,7 +249,7 @@ static void build_pict_list(char * first)
while(IMB_ispic(name)){
file = open(name, O_BINARY|O_RDONLY, 0);
if (file < 0) return;
- picture = (struct pict*)calloc(1, sizeof(struct pict));
+ picture = (struct pict*)MEM_callocN(sizeof(struct pict), "picture");
if (picture == 0){
printf("Not enough memory for pict struct \n");
close(file);
@@ -260,19 +260,19 @@ static void build_pict_list(char * first)
picture->IB_flags = IB_rect;
if (fromdisk == FALSE) {
- mem=(char *)malloc(size);
+ mem=(char *)MEM_mallocN(size, "build pic list");
if (mem==0){
printf("Couldn't get memory\n");
close(file);
- free(picture);
+ MEM_freeN(picture);
return;
}
if (read(file,mem,size) != size){
printf("Error while reading %s\n",name);
close(file);
- free(picture);
- free(mem);
+ MEM_freeN(picture);
+ MEM_freeN(mem);
return;
}
} else mem = 0;