Memory leak fix (found with Valgrind)
authorDaniel Genrich <daniel.genrich@gmx.net>
Fri, 11 Jul 2008 17:08:45 +0000 (17:08 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Fri, 11 Jul 2008 17:08:45 +0000 (17:08 +0000)
source/blender/blenlib/intern/storage.c

index ca7a376d3a2bc96235d1f48e05e183022cbe68ff..fbcc56ac21d69cd289de6d3e26080cd1d2a2b0d9 100644 (file)
@@ -382,6 +382,7 @@ void BLI_adddirstrings()
                        pwuser = getpwuid(files[num].s.st_uid);
                        if ( pwuser ) {
                        strcpy(files[num].owner, pwuser->pw_name);
+                       free(pwuser);
                        } else {
                                sprintf(files[num].owner, "%d", files[num].s.st_uid);
             }