aboutsummaryrefslogtreecommitdiff
path: root/src/pj_init.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-03-12 23:32:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-03-14 20:25:12 +0100
commita49738902a27624d835e5a6b9983a9803c322996 (patch)
tree8f0a7e5302e12ee0b3044a7b87ca2de6bbdfbc27 /src/pj_init.c
parentcde489ce64556e0ad5fa5da64bcb8fd88aee4c39 (diff)
downloadPROJ-a49738902a27624d835e5a6b9983a9803c322996.tar.gz
PROJ-a49738902a27624d835e5a6b9983a9803c322996.zip
Fix (mostly false positive) clang static analyzer warnings about potential null pointer dereference
Diffstat (limited to 'src/pj_init.c')
-rw-r--r--src/pj_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pj_init.c b/src/pj_init.c
index 16408ebb..2d549317 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -67,6 +67,9 @@ static paralist *string_to_paralist (PJ_CONTEXT *ctx, char *definition) {
c++;
}
+ if( next == 0 )
+ return 0;
+
/* Terminate list and return */
next->next = 0;
return first;