Fix two memory leaks.
authorAndre Noll <maan@systemlinux.org>
Sat, 31 May 2008 21:33:18 +0000 (23:33 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 31 May 2008 21:33:18 +0000 (23:33 +0200)
adu.c

diff --git a/adu.c b/adu.c
index 9b800ea..3a676c4 100644 (file)
--- a/adu.c
+++ b/adu.c
@@ -761,6 +761,7 @@ static int global_stats_loop_function(struct osl_row *row, void *data)
                printf("%s%s\n",
                        (gsi->flags & (GSF_PRINT_BYTES | GSF_PRINT_FILES))? "" : "\t",
                        dirname);
+               free(dirname);
        }
        if (gsi->count > 0)
                gsi->count--;
@@ -878,6 +879,7 @@ static int user_stats_loop_function(struct osl_row *row, void *data)
                printf("%s%s\n",
                        (usi->flags & (USF_PRINT_BYTES | USF_PRINT_FILES))? "" : "\t",
                        dirname);
+               free(dirname);
        }
        if (usi->count > 0)
                usi->count--;