]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Plug some memory leaks
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Feb 2011 21:32:02 +0000 (22:32 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Feb 2011 21:32:02 +0000 (22:32 +0100)
ccache.c

index 60d37a70fa46b509e788dcf5903d313fb94896e2..5c8810291baadfaa47b721762caee3ef876ceb1f 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -227,6 +227,7 @@ add_prefix(struct args *orig_args)
                        }
 
                        args_add(prefix, p);
+                       free(p);
                }
                free(e);
 
@@ -234,6 +235,7 @@ add_prefix(struct args *orig_args)
                for (i = prefix->argc; i != 0; i--) {
                        args_add_prefix(orig_args, prefix->argv[i-1]);
                }
+               args_free(prefix);
        }
 }