]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Avoid output_obj being freed by accident
authorChris AtLee <catlee@mozilla.com>
Fri, 22 Jul 2011 18:51:40 +0000 (14:51 -0400)
committerChris AtLee <catlee@mozilla.com>
Fri, 22 Jul 2011 18:51:40 +0000 (14:51 -0400)
ccache.c

index ab5573fbfa2b9438667d4f199727425192abdda4..96d5c7051176af5f1315984bb1eb0c83eceaf416 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -564,7 +564,7 @@ to_cache(struct args *args)
 
        if (output_to_real_object_first) {
                cc_log("Outputting to final destination");
-               tmp_obj = output_obj;
+               tmp_obj = x_strdup(output_obj);
        } else {
                tmp_obj = format("%s.tmp.%s", cached_obj, tmp_string());
        }