File 2dc1cf19-libxl-double-free.patch of Package libvirt.6159

commit 2dc1cf19dbaf648662fbf3c810db65ddcf5d0444
Author: Jim Fehlig <jfehlig@suse.com>
Date:   Wed Feb 15 10:45:27 2017 -0700

    libxl: fix potential double free in libxlDriverGetDom0MaxmemConf
    
    Commit 4ab0c959 fixed a memory leak in libxlDriverGetDom0MaxmemConf
    but introduced a potential double free of mem_tokens
    
    *** Error in `/usr/sbin/libvirtd': double free or corruption (out):
        0x00007fffc808cfd0 ***
    
    Avoid double free by setting mem_tokens to NULL after calling
    virStringListFree.

Index: libvirt-2.0.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-2.0.0.orig/src/libxl/libxl_conf.c
+++ libvirt-2.0.0/src/libxl/libxl_conf.c
@@ -1633,6 +1633,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriver
             }
         }
         virStringFreeList(mem_tokens);
+        mem_tokens = NULL;
     }
 
  physmem: