memif: fix the memory leak when memif cli getting wrong parameters inputs