diff -Naur a/libexslt/functions.c b/libexslt/functions.c
--- a/libexslt/functions.c	2014-09-02 11:53:45.618261632 +0530
+++ b/libexslt/functions.c	2014-09-02 11:55:43.117261364 +0530
@@ -112,6 +112,8 @@
     func = (exsltFuncFunctionData*)xmlHashLookup2(ch->hash, URI, name);
     if (func == NULL) {		/* Not yet present - copy it in */
 	func = exsltFuncNewFunctionData();
+        if (func == NULL)
+            return; 
 	memcpy(func, data, sizeof(exsltFuncFunctionData));
 	if (xmlHashAddEntry2(ch->hash, URI, name, func) < 0) {
 	    xsltGenericError(xsltGenericErrorContext,
