From a8aac6f56825365511b4cfef53bf93c3e53e71a0 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Fri, 18 Apr 2014 19:13:34 -0600 Subject: [PATCH] Corrected a null dereference error. --- oc2/occompile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oc2/occompile.c b/oc2/occompile.c index f877dc0f9..6dfa75126 100644 --- a/oc2/occompile.c +++ b/oc2/occompile.c @@ -150,7 +150,7 @@ occompile1(OCstate* state, OCnode* xnode, XXDR* xxdrs, OCdata** datap) /* Allocate a record instance */ OCdata* record = NULL; ocstat = occompilerecord(state,xnode,xxdrs,&record); - if(ocstat != OC_NOERR) goto fail; + if(ocstat != OC_NOERR || !record) goto fail; /* Capture the back link */ record->container = data; record->index = nelements;