Commit a02371fb authored by Phil Sutter's avatar Phil Sutter Committed by Stephen Hemminger

misc/ss: fix memory leak in user_ent_hash_build()

Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
parent 5950ba91
...@@ -483,8 +483,10 @@ static void user_ent_hash_build(void) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment