Re: [PATCH] delta-islands: free island_marks and bitmaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 02 2023, Eric Wong wrote:

> +	kh_foreach_value(island_marks, bitmap, {
> +		if (--bitmap->refcount == 0)

Style nit: if (!--x) rather than if (--x == 0) ?

> +			free(bitmap);
> +	});
> +	kh_destroy_oid_map(island_marks);
> +	island_marks = (void *)1; /* crash on unintended future use */

This seems counter-productive. If you just leave it free'd then various
analysis tools will spot a use-after-free earlier, won't they?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux