GNU bug report logs - #18145
memory leak in pwd

Previous Next

Package: coreutils;

Reported by: srinivas devaki <mr.eightnoteight <at> gmail.com>

Date: Tue, 29 Jul 2014 11:09:03 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: srinivas devaki <mr.eightnoteight <at> gmail.com>
To: 18145 <at> debbugs.gnu.org
Subject: bug#18145: memory leak in pwd
Date: Tue, 29 Jul 2014 12:32:04 +0530
[Message part 1 (text/plain, inline)]
i think there is a memory leak in pwd.c
I’m extremely sorry if this is wrong. I’m sending the git diff.

[eightnoteight <at> mr coreutils]$ git diff
diff --git a/src/pwd.c b/src/pwd.c
index 4993dfb..13d84cd 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -367,6 +367,7 @@ main (int argc, char **argv)
       if (wd)
         {
           puts (wd);
+          free (wd);
           exit (EXIT_SUCCESS);
         }
     }

and how can i contribute to gnu coreutils. how can i understand the code of
utils. which libraries should i get used to, before contributing to the gnu
coreutils.

Thanks !
​
[Message part 2 (text/html, inline)]

This bug report was last modified 10 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.