X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdthelp%2Fparser%2Fpass2%2Fhtag2%2Fcustom.c;h=69ad9f394ea5e9b80a0199dcfa5060640282f646;hb=e524a14c9cb27553eca1c460d9f38ba8b09a6b5b;hp=e29ea633ef9a5dff91c37f4f006b89f55cef4fda;hpb=c884521619ded86baea5e0a74c8d0d2234c232fe;p=oweals%2Fcde.git diff --git a/cde/programs/dthelp/parser/pass2/htag2/custom.c b/cde/programs/dthelp/parser/pass2/htag2/custom.c index e29ea633..69ad9f39 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/custom.c +++ b/cde/programs/dthelp/parser/pass2/htag2/custom.c @@ -16,7 +16,7 @@ * details. * * You should have received a copy of the GNU Lesser General Public - * License along with these librararies and programs; if not, write + * License along with these libraries and programs; if not, write * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ @@ -231,7 +231,10 @@ SEARCH *searchp; char *mb_entcontent; mb_entcontent = MakeMByteString(entcontent); -if (!*mb_entcontent) return NULL; /* null file name, don't open a directory */ +if (!mb_entcontent || !*mb_entcontent) { + m_free(mb_entcontent, "multi-byte string"); + return NULL; /* null file name, don't open a directory */ +} open = fopen(mb_entcontent, "r"); if (open)