X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/282e8606742769b8d641348347a348e62bfbdfb5..1fd76d60f580a4f33f1ad58e9314c12562fca116:/uip/repl.c?ds=sidebyside diff --git a/uip/repl.c b/uip/repl.c index 72d3ddbe..15aa0a3a 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -225,7 +225,8 @@ main (int argc, char **argv) nwhat = 0; continue; case BILDSW: - buildsw++; /* fall... */ + buildsw++; + /* FALLTHRU */ case NWHATSW: nwhat++; continue; @@ -239,8 +240,7 @@ main (int argc, char **argv) if (fcc) fcc = add (", ", fcc); fcc = add (cp, fcc); - if (dp) - free (dp); + mh_xfree(dp); continue; case FILESW: @@ -453,14 +453,16 @@ try_it_again: fclose (in); { - char *filename = concat (mp->foldpath, "/", msg, NULL); + char *filename = file ? file : concat (mp->foldpath, "/", msg, NULL); for (n = 0; n < svector_size (convert_types); ++n) { add_convert_header (svector_at (convert_types, n), svector_at (convert_args, n), filename, drft); } - free (filename); + if (! file) { + free (filename); + } } if (nwhat)