ui_util.c: Fixed memory leak when closing or clearing a log window
ui_util.c: Fixed memory leak when closing or clearing a log window

A small off-by-one error when freeing the buffer. Not a significant
leak, but still something we'd like to avoid.

srijan/ncdc,Tilka/ncdc,Tilka/ncdc,srijan/ncdc,srijan/ncdc