Improving protocol parameter management to avoid memory leak