Skip to content
Commit eb6229af authored by Adrian Reber's avatar Adrian Reber Committed by Andrei Vagin
Browse files

opts: use xstrdup () to assign char * options



With the previous change to dynamically allocate memory for each
possible configuration source (three different configuration files, CLI,
RPC) the char * options can no longer directly point to the character
strings extracted by getopt() as the memory might be free'd at some
point. This introduces a macro to set the char * options which first
does a xfree() and then a xstrdup().

Signed-off-by: default avatarAdrian Reber <areber@redhat.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent b427927f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment