From b7b2f556d23f659c4b80ce44a54026f34d52bf52 Mon Sep 17 00:00:00 2001 From: Geoff Martin Date: Wed, 6 Dec 2023 11:46:32 +0000 Subject: [PATCH] Remove invalid free of pointer into argv array. Fixes #284. Where the value has been overridden by the user the value pointer will point to memory within the argv array which should not be free'd. --- examples/unix/c11/z_pub.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/unix/c11/z_pub.c b/examples/unix/c11/z_pub.c index f6f9e6bd5..5da6db5d8 100644 --- a/examples/unix/c11/z_pub.c +++ b/examples/unix/c11/z_pub.c @@ -113,9 +113,6 @@ int main(int argc, char **argv) { z_close(z_move(s)); - if (value != default_value) { - free(value); - } return 0; } #else