提交 64cef432 编写于 作者: W Wang Rui 提交者: Ján Tomko

tests: Resolve Coverity RESOURCE_LEAK

The 'lib' handle will be leaked if 'dlsym' condition fails.
So close the handle before return.
Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
上级 8879185c
......@@ -114,6 +114,7 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv)
}
if (!(startup = dlsym(lib, "shunloadStart"))) {
fprintf(stderr, "Cannot find shunloadStart %s\n", dlerror());
dlclose(lib);
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册