From: Nguyễn Thái Ngọc Duy Date: Fri, 10 Jun 2016 11:57:26 GMT Subject: [PATCH] parse-options-cb.c: use string_list_append_nodup in OPT_STRING_LIST() Message-ID: <20160610115726.4805-1-pclouds@gmail.com> If the given string list has strdup_strings set (*), the string will be duplicated again. Pointless and leak memory. Ignore that flag. (*) only interpret-trailers.c does it at the moment Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options-cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse-options-cb.c b/parse-options-cb.c index 239898d..8a1b6e6 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -144,7 +144,7 @@ int parse_opt_string_list(const struct option *opt, const char *arg, int unset) if (!arg) return -1; - string_list_append(v, xstrdup(arg)); + string_list_append_nodup(v, xstrdup(arg)); return 0; } -- 2.8.2.524.g6ff3d78