aboutsummaryrefslogtreecommitdiff
path: root/contrib/ivshmem-client
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-06-24 13:33:32 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2015-10-24 18:03:18 +0200
commit45b00c44ceffeac8143fb8857a12677234114f2b (patch)
treef0d7407e7896c4317db5b50e1584b03009ac6b0c /contrib/ivshmem-client
parent5105b1d8c2d1ad4a25b8806e86c0f012936b2eed (diff)
contrib: remove unnecessary strdup()
getopt() optarg points to argv memory, no need to dup those values, fixes small leaks detected by clang-analyzer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'contrib/ivshmem-client')
-rw-r--r--contrib/ivshmem-client/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/ivshmem-client/main.c b/contrib/ivshmem-client/main.c
index 44531f57be..28dd81e5a1 100644
--- a/contrib/ivshmem-client/main.c
+++ b/contrib/ivshmem-client/main.c
@@ -53,7 +53,7 @@ ivshmem_client_parse_args(IvshmemClientArgs *args, int argc, char *argv[])
break;
case 'S': /* unix_sock_path */
- args->unix_sock_path = strdup(optarg);
+ args->unix_sock_path = optarg;
break;
default: