Commit a589dcda authored by Denys Fedoryschenko's avatar Denys Fedoryschenko Committed by Stephen Hemminger

Fix memory leak in local options

This change was forgotten by Stephen in the last release
Signed-off-by: default avatarDenys Fedoryschenko <denys@visp.net.lb>
Signed-off-by: default avatarJamal Hadi Salim <hadi@cyberus.ca>
parent 63c7d26f
...@@ -162,10 +162,10 @@ int string_to_number(const char *s, unsigned int min, unsigned int max, ...@@ -162,10 +162,10 @@ int string_to_number(const char *s, unsigned int min, unsigned int max,
return result; return result;
} }
static void free_opts(struct option *opts) static void free_opts(struct option *local_opts)
{ {
if (opts != original_opts) { if (local_opts != original_opts) {
free(opts); free(local_opts);
opts = original_opts; opts = original_opts;
global_option_offset = 0; global_option_offset = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment