From 275523661d2e6fa2d59def62e16231c09419db18 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 13 Jul 2012 10:38:29 +1000 Subject: [PATCH] Revert "Fix invalid free error when -o and -S are used together." This reverts commit 0d6944bd3f8cb19f7e4867f979ba753cd7e11110. Breaks lrztar. --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 9268415..35685ed 100644 --- a/main.c +++ b/main.c @@ -281,11 +281,13 @@ int main(int argc, char *argv[]) failure("Invalid nice value (must be -20..19)\n"); break; case 'o': - if (control->outdir || control->suffix) - failure("Cannot have -o and -O or -S together\n"); + if (control->outdir) + failure("Cannot have -o and -O together\n"); if (unlikely(STDOUT)) failure("Cannot specify an output filename when outputting to stdout\n"); control->outname = optarg; + free(control->suffix); + control->suffix = ""; break; case 'O': if (control->outname) /* can't mix -o and -O */