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

index 9e255965cd636132130d931653a9daa0508ea257..54fbb91832ded1db6230e67faa1162cdb0534298 100644 (file)
@@ -186,6 +186,9 @@ look(char *front, char *back)
 
        if (front)
                print_from(front, back);
+
+       free(comparbuf);
+
        return (front ? 0 : 1);
 }