stat: fix a small memory leak with %N
authorPádraig Brady <P@draigBrady.com>
Wed, 18 Aug 2010 23:53:39 +0000 (00:53 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 23 Aug 2010 06:15:24 +0000 (07:15 +0100)
* src/stat.c (print_stat): Free the buffer returned
from areadlink_with_size().

src/stat.c

index c3730f0..18a746f 100644 (file)
@@ -632,6 +632,7 @@ print_stat (char *pformat, size_t prefix_len, char m,
             }
           printf (" -> ");
           out_string (pformat, prefix_len, quote (linkname));
+          free (linkname);
         }
       break;
     case 'd':