[libvirt PATCH] virfirewalld: fix g_variant_get call

Pavel Hrdina posted 1 patch 3 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/415b496f6f8e71da80cb3957aa03ffec66ab3943.1600692110.git.phrdina@redhat.com
src/util/virfirewalld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] virfirewalld: fix g_variant_get call
Posted by Pavel Hrdina 3 years, 7 months ago
We need to pass pointer to `array`.

Reported-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 src/util/virfirewalld.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c
index 69c8b73da0..12448f0681 100644
--- a/src/util/virfirewalld.c
+++ b/src/util/virfirewalld.c
@@ -215,7 +215,7 @@ virFirewallDGetZones(char ***zones, size_t *nzones)
                            NULL) < 0)
         return -1;
 
-    g_variant_get(reply, "(@as)", array);
+    g_variant_get(reply, "(@as)", &array);
     *zones = g_variant_dup_strv(array, nzones);
 
     return 0;
-- 
2.26.2

Re: [libvirt PATCH] virfirewalld: fix g_variant_get call
Posted by Pavel Hrdina 3 years, 7 months ago
On Mon, Sep 21, 2020 at 02:41:58PM +0200, Pavel Hrdina wrote:
> We need to pass pointer to `array`.
> 
> Reported-by: Ján Tomko <jtomko@redhat.com>
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
>  src/util/virfirewalld.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I know it's to soon for ping but we should get this in before release
and it's trivial.

> diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c
> index 69c8b73da0..12448f0681 100644
> --- a/src/util/virfirewalld.c
> +++ b/src/util/virfirewalld.c
> @@ -215,7 +215,7 @@ virFirewallDGetZones(char ***zones, size_t *nzones)
>                             NULL) < 0)
>          return -1;
>  
> -    g_variant_get(reply, "(@as)", array);
> +    g_variant_get(reply, "(@as)", &array);
>      *zones = g_variant_dup_strv(array, nzones);
>  
>      return 0;
> -- 
> 2.26.2
> 
Re: [libvirt PATCH] virfirewalld: fix g_variant_get call
Posted by Ján Tomko 3 years, 7 months ago
On a Monday in 2020, Pavel Hrdina wrote:
>We need to pass pointer to `array`.
>
>Reported-by: Ján Tomko <jtomko@redhat.com>
>Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
>---
> src/util/virfirewalld.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>

Jano