diff options
Diffstat (limited to 'toys/pending/netstat.c')
-rw-r--r-- | toys/pending/netstat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/pending/netstat.c b/toys/pending/netstat.c index 02ab4fc2..f8d622e2 100644 --- a/toys/pending/netstat.c +++ b/toys/pending/netstat.c @@ -424,8 +424,8 @@ static void scan_pid_inodes(char *path) if (!isdigit(entry->d_name[0])) continue; snprintf(link_name, sizeof(link_name), "%s/%s", path, entry->d_name); - link = xreadlink(link_name); - if ((inode = ss_inode(link)) != -1) add2list(inode); + if ((link = xreadlink(link_name) && (inode = ss_inode(link))!=-1) + add2list(inode); free(link); } closedir(dp); |