From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:54 +0000 (-0700) Subject: resolutionSet: Should not free RandR12Info when RandR12GetInfo failed X-Git-Tag: stable-10.2.0~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4b6c83951aef605686f6313be4d0e18fb5abf9f;p=thirdparty%2Fopen-vm-tools.git resolutionSet: Should not free RandR12Info when RandR12GetInfo failed If for some reason RandR12GetInfo failed to return RandR12Info, it should not follow the cleanup path to free it. Instead it should return FALSE. --- diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c b/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c index b5fc83507..3c0292aa4 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c @@ -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);