Signed-off-by: Tiago Vignatti <[email protected]>
Reviewed-by: Nicolas Peninguy <[email protected]>
---
 dix/dixfonts.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 71689cf..fbac124 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1815,8 +1815,10 @@ SetDefaultFontPath(char *path)
     /* get enough for string, plus values -- use up commas */
     len = strlen(temp_path) + 1;
     nump = cp = newpath = malloc(len);
-    if (!newpath)
+    if (!newpath) {
+       free(temp_path);
        return BadAlloc;
+    }
     pp = (unsigned char *) temp_path;
     cp++;
     while (*pp) {
-- 
1.7.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to