]> xenbits.xensource.com Git - libvirt.git/commitdiff
virTypedParamsDeserialize: set nparams to 0 in case of an error
authorMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Tue, 17 Jul 2018 12:02:33 +0000 (14:02 +0200)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 23 Jul 2018 18:28:58 +0000 (14:28 -0400)
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/util/virtypedparam.c

index c50d29eb55167b54ef7c5f932480120a9b1b1adb..1a4393b5626d51be67bffb24c2c13d5ce9adaf97 100644 (file)
@@ -1467,6 +1467,7 @@ virTypedParamsDeserialize(virTypedParameterRemotePtr remote_params,
         } else {
             virTypedParamsFree(*params, i);
             *params = NULL;
+            *nparams = 0;
         }
     }
     return rv;