fix for fix - possible on second loop to use freed memory still.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 21 May 2012 10:13:43 +0000 (10:13 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 21 May 2012 10:13:43 +0000 (10:13 +0000)
source/blender/blenkernel/intern/key.c

index be3ea38844aac7abaae13ca670abf57052e37a1f..e1bc1af2519fc2442e86cf27fa420c5f5c664a67 100644 (file)
@@ -721,7 +721,6 @@ void do_rel_key(const int start, int end, const int tot, char *basispoin, Key *k
        KeyBlock *kb;
        int *ofsp, ofs[3], elemsize, b;
        char *cp, *poin, *reffrom, *from, elemstr[8];
        KeyBlock *kb;
        int *ofsp, ofs[3], elemsize, b;
        char *cp, *poin, *reffrom, *from, elemstr[8];
-       char *freefrom = NULL, *freereffrom = NULL;
        int poinsize;
 
        /* currently always 0, in future key_pointer_size may assign */
        int poinsize;
 
        /* currently always 0, in future key_pointer_size may assign */
@@ -754,6 +753,7 @@ void do_rel_key(const int start, int end, const int tot, char *basispoin, Key *k
                        if (!(kb->flag & KEYBLOCK_MUTE) && icuval != 0.0f && kb->totelem == tot) {
                                KeyBlock *refb;
                                float weight, *weights = kb->weights;
                        if (!(kb->flag & KEYBLOCK_MUTE) && icuval != 0.0f && kb->totelem == tot) {
                                KeyBlock *refb;
                                float weight, *weights = kb->weights;
+                               char *freefrom = NULL, *freereffrom = NULL;
 
                                /* reference now can be any block */
                                refb = BLI_findlink(&key->block, kb->relative);
 
                                /* reference now can be any block */
                                refb = BLI_findlink(&key->block, kb->relative);