From 783807a511082c753069c7c3c55565e7f15cc6d5 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Mon, 5 Jun 2023 06:31:30 +0900 Subject: [PATCH] lsfd: don't check the value returned from new_file() The funciton newver returns NULL. Signed-off-by: Masatake YAMATO --- misc-utils/lsfd.c | 6 ------ 1 file changed, 6 deletions(-) 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); } -- 2.47.3