Fix memory corruption when using -R; the values being stored in the list
authorDavid Given <dg@cowlark.com>
Fri, 15 Feb 2019 22:40:42 +0000 (23:40 +0100)
committerDavid Given <dg@cowlark.com>
Fri, 15 Feb 2019 22:40:42 +0000 (23:40 +0100)
weren't freeable when they should have been.

util/ack/trans.c

index 235b81f..1152dfb 100644 (file)
@@ -223,7 +223,7 @@ static void set_Rflag(char* argp)
                        }
                        else if (*eos == '=')
                        {
-                               t_cont(*prog)->t_prog = eos + 1;
+                               t_cont(*prog)->t_prog = keeps(eos + 1);
                        }
                        else
                        {