Fix memory leak in local options

This change was forgotten by Stephen in the last release

Signed-off-by: Denys Fedoryschenko <denys@visp.net.lb>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
This commit is contained in:
Denys Fedoryschenko 2009-02-07 08:49:32 -05:00 committed by Stephen Hemminger
parent 63c7d26f94
commit a589dcda9c
1 changed files with 3 additions and 3 deletions

View File

@ -162,10 +162,10 @@ int string_to_number(const char *s, unsigned int min, unsigned int max,
return result;
}
static void free_opts(struct option *opts)
static void free_opts(struct option *local_opts)
{
if (opts != original_opts) {
free(opts);
if (local_opts != original_opts) {
free(local_opts);
opts = original_opts;
global_option_offset = 0;
}