config: Replace xstrdup with strdup in add_option()
All callers of add_option pass string literal as "key" argument except one, where non-NULL condition is guarded by if(). Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
e4570f5db5
commit
6e7417c342
|
@ -133,7 +133,7 @@ add_option(InputOption **options, const char *key, const char *value)
|
||||||
*options = calloc(sizeof(**options), 1);
|
*options = calloc(sizeof(**options), 1);
|
||||||
if (!*options) /* Yeesh. */
|
if (!*options) /* Yeesh. */
|
||||||
return;
|
return;
|
||||||
(*options)->key = xstrdup(key);
|
(*options)->key = strdup(key);
|
||||||
(*options)->value = strdup(value);
|
(*options)->value = strdup(value);
|
||||||
(*options)->next = NULL;
|
(*options)->next = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue