Thanks, but it's not really a memory leak, as cmp is about to exit anyway; the only point of calling 'free' would be to waste some CPU time to pacify valgrind.
The memory error is a false alarm too. 'cmp' is deliberately accessing uninitialized storage as part of an optimization, where it reads word-by-word instead of byte-by-byte. On practical platforms no bug can occur there. Perhaps from a theoretical point of view there is a bug, since the C standard says behavior is undefined when a program accesses a word that contains an uninitialized byte, but even if we initialized those bytes the behavior would still be undefined (since the word could be a trap representation). There's little point to slowing down 'cmp' to pacify just one theoretical objection, when there other objections are equally fatal in theory. For what it's worth, to "fix" the memory error you can compile with -Dword='unsigned char', albeit at some performance cost.
