Re: What's cooking in git.git (Jun 2024, #01; Mon, 3)

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

 



Jeff King <peff@xxxxxxxx> writes:

> Weirdly, with ps/no-writable-strings merged (but without the fix
> above applied yet), SANITIZE=leak does not seem to find the leak
> anymore! Even though I can confirm in a debugger or by printing the
> strbuf's fields that it is still there. So that's...odd.

Yeah, that is what had me puzzled ;-)

> 	 	if (all_msgs.len == 0) {
> 	 		fprintf(stderr, "nothing to send\n");
> 	+		strbuf_release(&all_msgs);
> 	 		return 1;
> 	 	}
> 	 
> 	 	total = count_messages(&all_msgs);
> 	 	if (!total) {
> 	 		fprintf(stderr, "no messages to send\n");
> 	 		return 1;
> 	 	}
>
> But I wonder if strbuf_read() should handle the allocation itself when
> it does a 0-byte read. We already do so for an error return (so the
> "could not read from stdin" path above is actually OK).

Thanks.




[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