]> git.tue.mpg.de Git - adu.git/commitdiff
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 9b800eaf1cb2e75b6b990ba7976049d7d0e82c15..3a676c4dd29dc6c33c09001d12a9aedfdbc712ba 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--;