Fix potential memory leak

This commit is contained in:
Chris Young 2016-12-05 19:31:04 +00:00
parent 54e31b65d1
commit 2a9e89de75

View File

@ -234,6 +234,7 @@ static void ami_tree_redraw_req_dr(void *p)
if(ami_gui_get_space_box(twin->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
free(atrr_data);
return;
}
@ -282,6 +283,8 @@ static void ami_tree_redraw_req(void *p)
.plot = &amiplot
};
free(atrr_data);
if(!twin->win) return;
ami_update_pointer(twin->win, GUI_POINTER_WAIT);
@ -341,7 +344,6 @@ static void ami_tree_redraw_req(void *p)
}
}
free(atrr_data);
ami_gui_free_space_box(bbox);
ami_update_pointer(twin->win, GUI_POINTER_DEFAULT);
ami_clearclipreg(glob);