From: erg Date: Thu, 2 Jul 2009 14:39:32 +0000 (+0000) Subject: dup string so that sfio tmp stream can be reused X-Git-Tag: LAST_LIBGRAPH~32^2~1856 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32343ceaa9da6650166784ee6c0167464c7cbe34;p=graphviz dup string so that sfio tmp stream can be reused --- 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; }