From: Eugene Crosser Date: Thu, 9 Dec 2021 18:26:06 +0000 (+0100) Subject: netlink: Use abort() in case of netlink_abi_error X-Git-Tag: v1.0.2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5adbd76e49007bc50d4f12a0ed12f175e03f36e7;p=thirdparty%2Fnftables.git netlink: Use abort() in case of netlink_abi_error Library functions should not use exit(), application that uses the library may contain error handling path, that cannot be executed if library functions calls exit(). For truly fatal errors, using abort() is more acceptable than exit(). Signed-off-by: Eugene Crosser Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/netlink.c b/src/netlink.c index 15b8878e..b6d34832 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -59,7 +59,7 @@ void __noreturn __netlink_abi_error(const char *file, int line, { fprintf(stderr, "E: Contact urgently your Linux kernel vendor. " "Netlink ABI is broken: %s:%d %s\n", file, line, reason); - exit(NFT_EXIT_FAILURE); + abort(); } int netlink_io_error(struct netlink_ctx *ctx, const struct location *loc,