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

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to