From: Masatake YAMATO Date: Sun, 4 Jun 2023 21:31:30 +0000 (+0900) Subject: lsfd: don't check the value returned from new_file() X-Git-Tag: v2.40-rc1~402^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=783807a511082c753069c7c3c55565e7f15cc6d5;p=thirdparty%2Futil-linux.git lsfd: don't check the value returned from new_file() The funciton newver returns NULL. Signed-off-by: Masatake YAMATO --- diff --git a/misc-utils/lsfd.c b/misc-utils/lsfd.c index 9c56460e13..05a5f3f4db 100644 --- a/misc-utils/lsfd.c +++ b/misc-utils/lsfd.c @@ -850,9 +850,6 @@ static void parse_maps_line(struct path_cxt *pc, char *buf, struct proc *proc) */ goto try_map_files; f = new_file(proc, stat2class(&sb)); - if (!f) - return; - file_set_path(f, &sb, path, -assoc); } else { /* As used in tcpdump, AF_PACKET socket can be mmap'ed. */ @@ -866,9 +863,6 @@ static void parse_maps_line(struct path_cxt *pc, char *buf, struct proc *proc) if (ul_path_readlink(pc, sym, sizeof(sym), map_file) < 0) return; f = new_file(proc, stat2class(&sb)); - if (!f) - return; - file_set_path(f, &sb, sym, -assoc); }