misc/ss: fix memory leak in user_ent_hash_build()
Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
5950ba914e
commit
a02371fb38
|
|
@ -483,8 +483,10 @@ static void user_ent_hash_build(void)
|
||||||
|
|
||||||
sprintf(name + nameoff, "%d/fd/", pid);
|
sprintf(name + nameoff, "%d/fd/", pid);
|
||||||
pos = strlen(name);
|
pos = strlen(name);
|
||||||
if ((dir1 = opendir(name)) == NULL)
|
if ((dir1 = opendir(name)) == NULL) {
|
||||||
|
free(pid_context);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
process[0] = '\0';
|
process[0] = '\0';
|
||||||
p = process;
|
p = process;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue