提交 1f9da29d 编写于 作者: J Jim Meyering

usbFindBusByVendor: don't leak a DIR buffer and FD

* src/util/hostusb.c (usbFindBusByVendor): Don't leak a DIR buffer
and file descriptor.
上级 eaa2fd69
/*
* Copyright (C) 2009 Red Hat, Inc.
* Copyright (C) 2009-2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -151,6 +151,7 @@ static int usbFindBusByVendor(virConnectPtr conn,
ret = 0;
error:
closedir (dir);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册