Fix memory leak in LOGISTIC command