From: Igor Zlatkovic Date: Sat, 31 May 2003 15:44:23 +0000 (+0000) Subject: fixed potential crash incase of a bad stylesheet X-Git-Tag: v1.1.28~661 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=147e28b8aa9d6262edce9e8e790342cd2297cf64;p=platform%2Fupstream%2Flibxslt.git fixed potential crash incase of a bad stylesheet --- diff --git a/libxslt/xslt.c b/libxslt/xslt.c index 2750921..5bc3863 100644 --- a/libxslt/xslt.c +++ b/libxslt/xslt.c @@ -1983,12 +1983,14 @@ xsltParseStylesheetImportedDoc(xmlDocPtr doc) { xsltFreeStylesheet(ret); ret = NULL; } - if (ret->errors != 0) { - ret->doc = NULL; - xsltFreeStylesheet(ret); - ret = NULL; + if (ret != NULL) { + if (ret->errors != 0) { + ret->doc = NULL; + xsltFreeStylesheet(ret); + ret = NULL; + } } - + return(ret); }