]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
resolutionSet: Should not free RandR12Info when RandR12GetInfo failed
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:54 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:54 +0000 (11:23 -0700)
If for some reason RandR12GetInfo failed to return RandR12Info,
it should not follow the cleanup path to free it. Instead it
should return FALSE.

open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c

index b5fc83507ab612324e8464ca4b5bc4e820a038ff..3c0292aa45c0b8cf8d04d7f0b3a4752caedf7281 100644 (file)
@@ -1000,7 +1000,7 @@ RandR12_SetTopology(Display *dpy,           // IN/OUT: The display connection
    info = RandR12GetInfo(dpy, rootWin);
    if (!info) {
       g_warning("%s: Setup info struct failed.\n", __func__);
-      goto out_ungrab;
+      return FALSE;
    }
 
    RandR12GetDpi(dpy, screen, info);