From f03d46334bb318fad7a7b71900d6a3c11586b68f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 10 Jan 2012 17:04:52 +0100 Subject: helper: fix no-op add_link function * helper/ext2cpio.c (add_link): Don't leak just-allocated buffer. Instead, link it into links_head list. --- helper/ext2cpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helper/ext2cpio.c b/helper/ext2cpio.c index 2e8258f..82cc3b4 100644 --- a/helper/ext2cpio.c +++ b/helper/ext2cpio.c @@ -1,5 +1,5 @@ /* febootstrap-supermin-helper reimplementation in C. - * Copyright (C) 2009-2010 Red Hat Inc. + * Copyright (C) 2009-2010, 2012 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -348,6 +348,8 @@ add_link (ext2_ino_t real_ino) p->minor = dev_minor; p->major = dev_major; p->real_ino = real_ino; + p->next = links_head; + links_head = p; } static void -- cgit