expand: Fix expmeta resource leakage
commit509c4fba0d3ff5bb836d75ae05b9cfc29c0bacd2
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 1 Jun 2024 04:49:53 +0000 (1 12:49 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 8 Jun 2024 03:43:51 +0000 (8 11:43 +0800)
tree45a8f5ba73a83a4f0a17cb47fbbe8f2c1ab2573e
parentf822a30a3b76216c10bfd96595f6526f56f9dd8b
expand: Fix expmeta resource leakage

If memory allocation fails in expmeta, the DIRP will be leaked
along with expdir.

Fix this by adding setjmp/longjmp, and converting expdir to use
stack memory.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
src/expand.c