[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] [PATCH] Don't dereference pointer immediately after setting i
From: |
Alan Coopersmith |
Subject: |
[ft-devel] [PATCH] Don't dereference pointer immediately after setting it to NULL |
Date: |
Sat, 8 Mar 2014 19:39:46 -0800 |
Flagged by cppcheck 1.64:
[src/autofit/afglobal.c:336]: (error) Possible null pointer dereference: globals
---
src/autofit/afglobal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 7aa2e11..74e8a72 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -332,8 +332,8 @@
af_face_globals_free( globals );
globals = NULL;
}
-
- globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX;
+ else
+ globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX;
Exit:
*aglobals = globals;
--
1.7.9.2
- [ft-devel] [PATCH] Don't dereference pointer immediately after setting it to NULL,
Alan Coopersmith <=