diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-10-04 01:31:39 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-10-13 00:35:13 +0100 |
commit | 97bcdcf107ddf36cbbec5cafe85f6440476d0418 (patch) | |
tree | 1d23b0ef5be7b1eb1548b63d1112e8dc1b11ad35 | |
parent | 1eb4371e2534296d04580cb8b9cb5baa5f07e27d (diff) | |
download | procd-97bcdcf107ddf36cbbec5cafe85f6440476d0418.tar.gz |
uxc: fix segfault caused by use-after-free
Don't free blob_buf which was sent via ubus.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r-- | uxc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -586,12 +586,12 @@ static int uxc_create(char *name, bool immediately) ret = 0; if (ubus_lookup_id(ctx, "container", &id) || ubus_invoke(ctx, id, "add", req.head, NULL, NULL, 3000)) { + blob_buf_free(&req); ret = EIO; } free(jailname); free(path); - blob_buf_free(&req); return ret; } |