[PATCH 0/1] MR5124: dlls/msi: Avoid leaking stream on DB update
MSI_RecordGetIStream adds a reference to the stream. This reference should be negated as we are done setting the stream. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5124
From: David Kahurani <k.kahurani(a)gmail.com> MSI_RecordGetIStream adds a reference to the stream. This reference should be negated as we are done setting the stream. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/msi/select.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/msi/select.c b/dlls/msi/select.c index cfb17f60b62..975d2b8e066 100644 --- a/dlls/msi/select.c +++ b/dlls/msi/select.c @@ -20,6 +20,8 @@ #include <stdarg.h> +#define COBJMACROS + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -269,6 +271,7 @@ UINT msi_select_update(MSIVIEW *view, MSIRECORD *rec, UINT row) if (MSI_RecordGetIStream(rec, i + 1, &stream)) return ERROR_FUNCTION_FAILED; r = sv->table->ops->set_stream(sv->table, row, col, stream); + IStream_Release(stream); } else if (type & MSITYPE_STRING) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5124
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5124
participants (3)
-
David Kahurani -
David Kahurani (@kahurani) -
Hans Leidekker (@hans)