fix resource leak for not invoking closedir() after opendir()
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
This commit is contained in:
parent
0e741b2624
commit
d23f36745e
|
@ -583,6 +583,7 @@ static void get_irq_user_policy(char *path, int irq, struct user_irq_policy *pol
|
|||
break;
|
||||
}
|
||||
}
|
||||
closedir(poldir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -424,6 +424,7 @@ int main(int argc, char **argv)
|
|||
fclose(f);
|
||||
}
|
||||
} while((entry) && (irqbalance_pid == -1));
|
||||
closedir(dir);
|
||||
}
|
||||
if(irqbalance_pid == -1) {
|
||||
printf("Unable to determine irqbalance PID\n");
|
||||
|
|
Loading…
Reference in a new issue