Fix r203922 for "fortune -o": we free tpath when was_malloc is true
authormarcel <marcel@FreeBSD.org>
Sat, 7 Dec 2013 01:35:18 +0000 (01:35 +0000)
committermarcel <marcel@FreeBSD.org>
Sat, 7 Dec 2013 01:35:18 +0000 (01:35 +0000)
commitfbd9d78c47bb221eac61fa51d6b53ac4b5b24569
tree59273df37462868d939efaf2c1f69152fbd40df9
parentea67b8239d4b9fc5ec66acb0b55c08b6724c220c
Fix r203922 for "fortune -o": we free tpath when was_malloc is true
but don't define tpath everytime we set was_malloc to true. We end
up calling free() multiple times for the same pointer, resulting in:
<jemalloc>: jemalloc_arena.c:355: Failed assertion: ...
When we set path to offensive, we need to set tpath as well.
games/fortune/fortune/fortune.c