diff options
author | Thomas Haller <thaller@redhat.com> | 2023-12-01 18:59:34 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-12-01 18:59:34 (GMT) |
commit | 46e8739ef70874310501bb80769016337fd8aa65 (patch) | |
tree | cff598eccbebaae860f526ea0f6f4a5576158dc4 | |
parent | a06c8f76c2ea13793150642600ea14841e92e0aa (diff) | |
download | libnl-46e8739ef70874310501bb80769016337fd8aa65.zip libnl-46e8739ef70874310501bb80769016337fd8aa65.tar.gz libnl-46e8739ef70874310501bb80769016337fd8aa65.tar.bz2 |
src: fix leak in "nl-cls-add"
Not important, but coverity flags this. Avoid it.
-rw-r--r-- | src/nl-cls-add.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nl-cls-add.c b/src/nl-cls-add.c index 0f85859..b583872 100644 --- a/src/nl-cls-add.c +++ b/src/nl-cls-add.c @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) case 'v': nl_cli_print_version(); break; case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break; case 'p': nl_cli_tc_parse_parent(tc, optarg); break; - case 'i': id = strdup(optarg); break; + case 'i': free(id); id = strdup(optarg); break; case ARG_UPDATE: flags = NLM_F_CREATE; break; case ARG_UPDATE_ONLY: flags = 0; break; case ARG_MTU: nl_cli_tc_parse_mtu(tc, optarg); break; |