main: fix leaking -p/-s argument values
authorJo-Philipp Wich <jo@mein.io>
Mon, 7 Feb 2022 09:04:11 +0000 (10:04 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 7 Feb 2022 09:04:11 +0000 (10:04 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
main.c

diff --git a/main.c b/main.c
index d1aac09c355206b25674319f75ef8f99399caf4b..de5f2c3a6bcb298385e8840606eae19f737c4c43 100644 (file)
--- a/main.c
+++ b/main.c
@@ -328,6 +328,7 @@ int main(int argc, char **argv)
                case 'p':
                        optarg = strdup(optarg);
                        bound += add_listener_arg(optarg, (ch == 's'));
+                       free(optarg);
                        break;
 
                case 'h':