ss: Streamline process context printing in netlink_show_one()
There's no need to check 'pid_context' before calling free(). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
38509fa903
commit
22658ff53a
|
|
@ -3593,12 +3593,8 @@ static int netlink_show_one(struct filter *f,
|
||||||
else if (pid > 0)
|
else if (pid > 0)
|
||||||
getpidcon(pid, &pid_context);
|
getpidcon(pid, &pid_context);
|
||||||
|
|
||||||
if (pid_context != NULL) {
|
printf(" proc_ctx=%s", pid_context ? : "unavailable");
|
||||||
printf(" proc_ctx=%s", pid_context);
|
free(pid_context);
|
||||||
free(pid_context);
|
|
||||||
} else {
|
|
||||||
printf(" proc_ctx=unavailable");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show_details) {
|
if (show_details) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue