]> granicus.if.org Git - graphviz/commitdiff
dup string so that sfio tmp stream can be reused
authorerg <devnull@localhost>
Thu, 2 Jul 2009 14:39:32 +0000 (14:39 +0000)
committererg <devnull@localhost>
Thu, 2 Jul 2009 14:39:32 +0000 (14:39 +0000)
lib/gvpr/compile.c

index 6319dd9b4006174b3610bf579e664f31ff439a8f..2b4d706f1c3d05b6da8a1326c5b4cedfeb119d71 100644 (file)
@@ -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;
 }