summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-10 17:04:52 +0100
committerJim Meyering <meyering@redhat.com>2012-01-10 17:04:52 +0100
commitf03d46334bb318fad7a7b71900d6a3c11586b68f (patch)
tree8b306769cf9120e13e46c9b635adb634c7c3dab0
parent7c2ff55613598a1295e213cef36600ad61da7ed6 (diff)
downloadfebootstrap-f03d46334bb318fad7a7b71900d6a3c11586b68f.tar.gz
febootstrap-f03d46334bb318fad7a7b71900d6a3c11586b68f.tar.xz
febootstrap-f03d46334bb318fad7a7b71900d6a3c11586b68f.zip
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.
-rw-r--r--helper/ext2cpio.c4
1 files changed, 3 insertions, 1 deletions
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