svn commit: r323692 - in head/sys/compat: linsysfs linux

Hans Petter Selasky hps at selasky.org
Mon Sep 18 15:08:11 UTC 2017


On 09/18/17 01:40, Conrad Meyer wrote:
>   	device_get_children(dev, &children, &nchildren);
>   	for (i = 0; i < nchildren; i++) {
>   		if (children[i])
> -			linsysfs_run_bus(children[i], dir, scsi, new_path, prefix);
> +			linsysfs_run_bus(children[i], dir, scsi, chardev, new_path, prefix);
>   	}
>   	if (new_path != path)
>   		free(new_path, M_TEMP);
> +	free(chardevname, M_TEMP);
>   
>   	return (1);

1) Return code from device_get_children() should be checked.

2) children pointer should be freed else there is a memory leak.

--HPS


More information about the svn-src-head mailing list