Pierre Schweitzer : msi: Don't leak memory on failure.
Module: wine Branch: master Commit: f621f4102d6e85dead75d229a633df4493f191e3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f621f4102d6e85dead75d229a6... Author: Pierre Schweitzer <pierre(a)reactos.org> Date: Sat Oct 21 11:46:39 2017 +0200 msi: Don't leak memory on failure. Signed-off-by: Pierre Schweitzer <pierre(a)reactos.org> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/action.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 2f065da..58a831e 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -195,7 +195,11 @@ static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start, template = msi_get_error_message(package->db, start ? MSIERR_INFO_ACTIONSTART : MSIERR_INFO_ACTIONENDED); row = MSI_CreateRecord(2); - if (!row) return; + if (!row) + { + msi_free(template); + return; + } MSI_RecordSetStringW(row, 0, template); MSI_RecordSetStringW(row, 1, action); MSI_RecordSetInteger(row, 2, start ? package->LastActionResult : rc);
participants (1)
-
Alexandre Julliard