qga-win: Free GMatchInfo properly
authorKostiantyn Kostiuk <konstantin@daynix.com>
Thu, 10 Jun 2021 15:58:11 +0000 (18:58 +0300)
committerMichael Roth <michael.roth@amd.com>
Tue, 3 Aug 2021 03:11:45 +0000 (22:11 -0500)
commit24328b7a83a43d65389eda0cbabbd67595f43b5b
tree4ce1fff2a1e30ec9a434ace827c0e21a4ffab0fc
parentce72f11274f6499b44aa7f2f214f6e7fc09bd9d2
qga-win: Free GMatchInfo properly

The g_regex_match function creates match_info even if it
returns FALSE. So we should always call g_match_info_free.
A better solution is using g_autoptr for match_info variable.

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
qga/commands-win32.c