Signed-off-by: Florian Bäuerle <florian.baeuerle@xxxxxxxxxxxx> --- lib/recursive_action.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/recursive_action.c b/lib/recursive_action.c index 4ccddc39b..9505c8628 100644 --- a/lib/recursive_action.c +++ b/lib/recursive_action.c @@ -149,7 +149,7 @@ int recursive_action(const char *fileName, if (DO_SORT(flags)) { struct dirlist *e = xmalloc(sizeof(*e)); - e->dirname = xstrdup(next->d_name); + e->dirname = nextFile; list_add(&e->list, &dirs); } else { /* descend into it, forcing recursion. */ @@ -157,8 +157,8 @@ int recursive_action(const char *fileName, fileAction, dirAction, userData, depth+1)) { status = 0; } + free(nextFile); } - free(nextFile); } if (DO_SORT(flags)) { -- 2.19.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox