]> xenbits.xensource.com Git - libvirt.git/commitdiff
vbox_common: Drop needless set to NULL
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Feb 2022 14:32:48 +0000 (15:32 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 8 Feb 2022 07:41:56 +0000 (08:41 +0100)
There are two places where a variable passed to VBOX_RELEASE()
macro is set to NULL explicitly. There is no need for that
because the macro sets the variable to NULL already.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/vbox/vbox_common.c

index eec47a02fca0c4d8bf34035e3050d08cfd411674..db54eacb3b48c33f9952971bc46f3eac559ce2d7 100644 (file)
@@ -2808,7 +2808,6 @@ static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
             if (systemProperties) {
                 gVBoxAPI.UISystemProperties.GetMaxGuestRAM(systemProperties, &maxMemorySize);
                 VBOX_RELEASE(systemProperties);
-                systemProperties = NULL;
             }
 
             gVBoxAPI.UIMachine.GetCPUCount(machine, &CPUCount);
@@ -4015,7 +4014,6 @@ static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
         gVBoxAPI.UISystemProperties.GetSerialPortCount(systemProperties, &serialPortCount);
         gVBoxAPI.UISystemProperties.GetParallelPortCount(systemProperties, &parallelPortCount);
         VBOX_RELEASE(systemProperties);
-        systemProperties = NULL;
     }
     /* Currently setting memory and maxMemory as same, cause
      * the notation here seems to be inconsistent while