From bdcc3b0713f4c50d09857083c4ae27e8fb3acaad Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 4 Jan 2022 02:02:12 +0900 Subject: [PATCH] elf-util: add missing assertion (cherry picked from commit 80b241f2ec98509cbc89d2fb1626403167a832fb) --- src/shared/elf-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/elf-util.c b/src/shared/elf-util.c index 104a35cc77..4d93e7eaba 100644 --- a/src/shared/elf-util.c +++ b/src/shared/elf-util.c @@ -685,6 +685,8 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha _cleanup_free_ char *buf = NULL; int r; + assert(fd >= 0); + r = dlopen_dw(); if (r < 0) return r;