Thread (2 messages) flat view 2 messages, 2 authors, 2017-08-18

Re: [PATCH v4 4/4] commit: rewrite read_graft_line

From: Junio C Hamano <hidden>
Date: 2017-08-18 19:12:24

Patryk Obara [off-list ref] writes:
Actually, I don't think I needed to remove free(graft) line, but I don't
know if freeing NULL is considered ok in git code. Let me know if I
should bring it back, please.
Calling free(var) when var may or may not be NULL is perfectly fine.

We even discourage people from writing:

	if (var)
		free(var);

because an unconditional call to free(var) is sufficient.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help