Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH] mailmap: fix check for freeing memory

From: Thomas Rast <hidden>
Date: 2016-06-15 22:58:27

Possibly related (same subject, not in this thread)

Stefan Beller [off-list ref] writes:
The condition as it is written in that line was most likely intended to
check for the pointer passed to free(), rather than checking for the
'repo_abbrev', which is already checked against being non null at the
beginning of the function.
[...]
-			if (repo_abbrev)
+			if (*repo_abbrev)
 				free(*repo_abbrev);
But now the test is useless, because free(NULL) is defined to be a
no-op.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help