[PATCH 1/2] dmx: Fix memory leak in dmxBELoadFont (#50281)

Adam Jackson ajax at redhat.com
Wed Apr 30 10:49:05 PDT 2014


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/dmx/dmxfont.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c
index 6b81826..115422d 100644
--- a/hw/dmx/dmxfont.c
+++ b/hw/dmx/dmxfont.c
@@ -397,12 +397,12 @@ dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont)
                    "font-path-related options, see the Xdmx man page.\n");
         }
 
+        free(goodfps);
         if (!dmxIgnoreBadFontPaths ||
             (dmxIgnoreBadFontPaths && dmxSetFontPath(dmxScreen))) {
             /* We still have errors so return with error */
             dmxFreeFontPath(fp);
             XFreeFontPath(oldFontPath);
-            free(goodfps);
             return FALSE;
         }
     }
-- 
1.8.5.3



More information about the xorg-devel mailing list