[Bf-blender-cvs] [2beb0bf] master: Fix memory leak in (the still unused) WM_reportf.
Brecht Van Lommel
noreply at git.blender.org
Sat Jan 16 23:27:17 CET 2016
Commit: 2beb0bfc6c732ea4943c9b1fd8cc0562a3927fc1
Author: Brecht Van Lommel
Date: Sat Jan 16 23:21:27 2016 +0100
Branches: master
https://developer.blender.org/rB2beb0bfc6c732ea4943c9b1fd8cc0562a3927fc1
Fix memory leak in (the still unused) WM_reportf.
===================================================================
M source/blender/windowmanager/intern/wm_event_system.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 4d6bc15..a8f5416 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -659,7 +659,9 @@ void WM_reportf(ReportType type, const char *format, ...)
BLI_dynstr_vappendf(ds, format, args);
va_end(args);
- WM_report(type, BLI_dynstr_get_cstring(ds));
+ char *str = BLI_dynstr_get_cstring(ds);
+ WM_report(type, str);
+ MEM_freeN(str);
BLI_dynstr_free(ds);
}
More information about the Bf-blender-cvs
mailing list