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:
parent
63c7d26f94
commit
a589dcda9c
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue