From 32343ceaa9da6650166784ee6c0167464c7cbe34 Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 2 Jul 2009 14:39:32 +0000 Subject: [PATCH] dup string so that sfio tmp stream can be reused --- lib/gvpr/compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c index 6319dd9b4..2b4d706f1 100644 --- a/lib/gvpr/compile.c +++ b/lib/gvpr/compile.c @@ -2290,7 +2290,7 @@ comp_prog *compileProg(parse_prog * inp, Gpr_t * state, int flags) } if (flags) { - endg_sfx = doFlags(flags, tmps); + endg_sfx = strdup (doFlags(flags, tmps)); if (*endg_sfx == '\0') endg_sfx = 0; } @@ -2356,6 +2356,7 @@ comp_prog *compileProg(parse_prog * inp, Gpr_t * state, int flags) freeCompileProg (p); p = 0; } + free (endg_sfx); return p; } -- 2.40.0