if (video->attached_array) kfree(video->attached_array); 
kfree(video->attached_array); 
static int acpi_video_device_enumerate(struct acpi_video_bus *video){	int status;	int count;	int i;	struct acpi_video_enumerated_device *active_device_list;	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };	union acpi_object *dod = NULL;	union acpi_object *obj;	ACPI_FUNCTION_TRACE("acpi_video_device_enumerate");	status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer);	if (!ACPI_SUCCESS(status)) {		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _DOD\n"));		return_VALUE(status);	}	dod = (union acpi_object *)buffer.pointer;	if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) {		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DOD data\n"));		status = -EFAULT;		goto out;	}	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d video heads in _DOD\n",			  dod->package.count));	active_device_list = kmalloc((1 +				      dod->package.count) *				     sizeof(struct					    acpi_video_enumerated_device),				     GFP_KERNEL);	if (!active_device_list) {		status = -ENOMEM;		goto out;	}	count = 0;	for (i = 0; i < dod->package.count; i++) {		obj = (union acpi_object *)&dod->package.elements[i];		if (obj->type != ACPI_TYPE_INTEGER) {			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,					  "Invalid _DOD data\n"));			active_device_list[i].value.int_val =			    ACPI_VIDEO_HEAD_INVALID;		}		active_device_list[i].value.int_val = obj->integer.value;		active_device_list[i].bind_info = NULL;		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "dod element[%d] = %d\n", i,				  (int)obj->integer.value));		count++;	}	active_device_list[count].value.int_val = ACPI_VIDEO_HEAD_END;	if (video->attached_array)		kfree(video->attached_array);	video->attached_array = active_device_list;	video->attached_count = count;      out:	acpi_os_free(buffer.pointer);	return_VALUE(status);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6044ec8882c726e325017bd948aa0cd94ad33abc/video.c/clean/drivers/acpi/video.c