rem: if (!encfonts)
add: if (!encfonts || strcmp(encfonts, "") == 0) { free((void*) encfonts);
context: getodir(int o, ErrorHandler *errh){    assert(o >= 0 && o < NUMODIR);        if (!odir[o] && automatic && odir_info[o].envvar)	odir[o] = getenv(odir_info[o].envvar);    #ifdef HAVE_KPATHSEA    if (!odir[o] && automatic && !writable_texdir_tried)	find_writable_texdir(errh, odir_info[o].name);    if (!odir[o] && automatic && writable_texdir) {	String suffix = odir_info[o].texdir;		// May need to behave differently on TDS 1.1 rather than TDS 1.0. 	if (suffix[0] == '#') {	    // check type of TDS	    if (tds_1_1 < 0) {		// using a procedure suggested by Olaf Weber		char* encfonts = kpsei_path_expand("$TEXMFMAIN/fonts/enc");		if (!encfonts)		    encfonts = kpsei_path_expand("$TEXMFDIST/fonts/enc");		tds_1_1 = encfonts != 0;		free((void*) encfonts);	    }	    if (tds_1_1 == 0)		suffix = suffix.substring(std::find(suffix.begin() + 1, suffix.end(), '#') + 1, suffix.end());	    else		suffix = suffix.substring(suffix.begin() + 1, std::find(suffix.begin() + 1, suffix.end(), '#'));	}		String dir = writable_texdir + suffix;	if (dir.back() == '%')	    dir = dir.substring(0, -1) + get_vendor() + "/" + get_typeface();	else if (dir.back() == '@')	    dir = dir.substring(0, -1) + get_vendor();		// create parent directories as appropriate	int slash = writable_texdir.length() - 1;	while (access(dir.c_str(), F_OK) < 0 && slash < dir.length()) {	    if ((slash = dir.find_left('/', slash + 1)) < 0)		slash = dir.length();	    String subdir = dir.substring(0, slash);	    if (access(subdir.c_str(), F_OK) < 0		&& !no_create		&& mkdir(subdir.c_str(), 0777) < 0)		goto kpathsea_done;	}	// that's our answer	odir[o] = dir;	odir_kpathsea[o] = dir;    }  kpathsea_done:#endif        if (!odir[o]) {	if (automatic)	    errh->warning("%s not specified, placing %s files in '.'", odir_info[o].envvar, odir_info[o].name);	odir[o] = ".";    }        while (odir[o].length() && odir[o].back() == '/')	odir[o] = odir[o].substring(0, -1);        if (verbose)	errh->message("placing %s files in '%s'", odir_info[o].name, odir[o].c_str());    return odir[o];}