--- fontconfig-2.11.93/src/fccharset.c 2014-07-04 13:58:57.000000000 +0530 +++ fontconfig-2.11.93_new/src/fccharset.c 2015-05-26 17:28:19.861732414 +0530 @@ -185,7 +185,18 @@ } if (!leaves || !numbers) + { + /* freeing locally created leaves and numbers */ + if( leaves ) + { + free (leaves); + } + if( numbers ) + { + free (numbers); + } return FcFalse; + } fcs->leaves_offset = FcPtrToOffset (fcs, leaves); fcs->numbers_offset = FcPtrToOffset (fcs, numbers);