From 7e476dc40332859ef2abb9cfe394dc82cc1eb36d Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sat, 7 Oct 2006 01:54:00 +0000 Subject: [PATCH] avoid crash when error compiling git-svn-id: svn://svn.lighttpd.net/xcache/trunk@216 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- xcache.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xcache.c b/xcache.c index d409149..05233d5 100644 --- a/xcache.c +++ b/xcache.c @@ -1042,6 +1042,10 @@ err_bailout: /* free it, no install. restore now */ xc_sandbox_free(&sandbox, 0 TSRMLS_CC); } + else if (!op_array) { + /* failed to compile free it, no install */ + xc_sandbox_free(&sandbox, 0 TSRMLS_CC); + } else { CG(active_op_array) = op_array; xc_sandbox_free(&sandbox, 1 TSRMLS_CC);