]> err.no Git - util-linux/commitdiff
namei: fix memory leak in namei(1)
authorDavidlohr Bueso <dave.bueso@gmail.com>
Wed, 28 Jul 2010 21:20:38 +0000 (17:20 -0400)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jul 2010 15:50:46 +0000 (17:50 +0200)
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
misc-utils/namei.c

index 3c465e4349e4cfa96530e3f4730c7b3d21a2f3e0..6853e1ec2d2e60d6fbacf8759a1966f7c035b1d2 100644 (file)
@@ -325,6 +325,9 @@ add_namei(struct namei *parent, const char *orgpath, int start, struct namei **l
 
        if (last)
                *last = nm;
+
+       free(path);
+
        return first;
 }