>>357
static char *buf; に対して1回malloc()呼ぶだけだからリークしないよ。