diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-06-14 01:09:37 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-06-14 01:09:37 +0300 |
commit | a394d681775cc9f5e83a28fb12c0d6aba1a6681c (patch) | |
tree | 5d74a352ec28667c6d5a34594f39a1b7398496ce /source/blender/blenloader | |
parent | c9de10a632e31f7343e5ee14e2d1b3bc0030fed1 (diff) |
Fix possible heap use-after-free in workspace lib-linking
Caused by one of the recent commits during workspace review.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 682ca637fcb..fc97beb2c7e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2797,9 +2797,10 @@ static void lib_link_workspaces(FileData *fd, Main *bmain) IDP_LibLinkProperty(id->properties, fd); id_us_ensure_real(id); - for (WorkSpaceLayout *layout = layouts->first; layout; layout = layout->next) { + for (WorkSpaceLayout *layout = layouts->first, *layout_next; layout; layout = layout_next) { bScreen *screen = newlibadr(fd, id->lib, BKE_workspace_layout_screen_get(layout)); + layout_next = layout->next; if (screen) { BKE_workspace_layout_screen_set(layout, screen); |