Skip to content

Commit

Permalink
Minor enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Mar 9, 2024
1 parent 1095cf3 commit fec23de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bsd/kinfo_getvmmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ kinfo_getvmmap(pid_t pid, int *cntp)
kiv[i].kve_protection = (prot[2] == 'x') ? KVME_PROT_EXEC : 0;
if (!strcmp(type, "vnode")) {
kiv[i].kve_type |= KVME_TYPE_VNODE;
if (lstat(kiv[i].kve_path, &st) < 0)
if (kiv[i].kve_path[0] != '/' || lstat(kiv[i].kve_path, &st) < 0)
kiv[i].kve_path[0] = '\0';
}
}
Expand Down

0 comments on commit fec23de

Please sign in to comment.