[LEDE-DEV] [PATCH] libfstools: support file paths longer than 255 chars

Jo-Philipp Wich jo at mein.io
Sat Jan 6 04:52:03 PST 2018


Hi,

> You missed call to free(globdir); at end.

the buffer pointed to be globdir is supposed to stay, to be reused by
later invocations of foreachdir(). It's kind of a lazily initialized
global scratch buffer to construct intermediate path strings.

Good catch on the globfree() though, the way it is (not) implemented
right now seems to lead to some quite significant memory leaking,
especially when traversing deep and large directory structures.

~ Jo



More information about the Lede-dev mailing list