X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhmisc.c;h=eb29e833616e29a89f74958da6e59e893dcbd8d1;hb=18b08c1d08cc93b6d86c4e71013e5f8dd3ea103b;hp=313719f080d4f210785f33f1ec46beb6cc433c55;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/uip/mhmisc.c b/uip/mhmisc.c index 313719f..eb29e83 100644 --- a/uip/mhmisc.c +++ b/uip/mhmisc.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include extern int debugsw; @@ -51,7 +53,7 @@ part_ok(CT ct, int sP) for (ap = parts; *ap; ap++) { len = strlen(*ap); - if (!strncmp(*ap, ct->c_partno, len) && + if (strncmp(*ap, ct->c_partno, len)==0 && (!ct->c_partno[len] || ct->c_partno[len] == '.' )) return 1; @@ -119,7 +121,7 @@ losing_directory: ep = concat("Create directory \"", file, "\"? ", NULL); answer = getanswer(ep); - free(ep); + mh_free0(&ep); if (!answer) goto losing_directory; @@ -235,7 +237,6 @@ flush_errors(void) if (errs) { fflush(stdout); fprintf(stderr, "%s", errs); - free(errs); - errs = NULL; + mh_free0(&errs); } }