Merge branch 'cde-fixups-1' of ssh://git.code.sf.net/p/cdesktopenv/code into cde...
[oweals/cde.git] / cde / programs / dthelp / parser / pass2 / htag2 / custom.c
index e29ea633ef9a5dff91c37f4f006b89f55cef4fda..69ad9f394ea5e9b80a0199dcfa5060640282f646 100644 (file)
@@ -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)