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:
Mikhail Gusarov 2010-06-04 17:05:35 +07:00
parent e4570f5db5
commit 6e7417c342

View File

@ -133,7 +133,7 @@ add_option(InputOption **options, const char *key, const char *value)
*options = calloc(sizeof(**options), 1);
if (!*options) /* Yeesh. */
return;
(*options)->key = xstrdup(key);
(*options)->key = strdup(key);
(*options)->value = strdup(value);
(*options)->next = NULL;
}