From: Yu Watanabe Date: Mon, 3 Jan 2022 17:02:12 +0000 (+0900) Subject: elf-util: add missing assertion X-Git-Tag: v251-rc1~608^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80b241f2ec98509cbc89d2fb1626403167a832fb;p=thirdparty%2Fsystemd.git elf-util: add missing assertion --- diff --git a/src/shared/elf-util.c b/src/shared/elf-util.c index 32335f9cdb7..8cb4a992988 100644 --- a/src/shared/elf-util.c +++ b/src/shared/elf-util.c @@ -689,6 +689,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;