Fixing the memory leak intruduced by my previous patch. Thanks to Ithamar for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37325 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -765,7 +765,7 @@ publish_devices()
|
|||||||
{
|
{
|
||||||
TRACE((DRIVER_NAME": publish_devices()\n"));
|
TRACE((DRIVER_NAME": publish_devices()\n"));
|
||||||
if (gDeviceNames) {
|
if (gDeviceNames) {
|
||||||
for (int32 i = 1; gDeviceNames[i]; i++)
|
for (int32 i = 0; gDeviceNames[i]; i++)
|
||||||
free(gDeviceNames[i]);
|
free(gDeviceNames[i]);
|
||||||
free(gDeviceNames);
|
free(gDeviceNames);
|
||||||
gDeviceNames = NULL;
|
gDeviceNames = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user