Skip to content

Commit

Permalink
Remove invalid free of pointer into argv array. Fixes eclipse-zenoh#284.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gmartin82 committed Dec 6, 2023
1 parent ac566f5 commit b7b2f55
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/unix/c11/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ int main(int argc, char **argv) {

z_close(z_move(s));

if (value != default_value) {
free(value);
}
return 0;
}
#else
Expand Down

0 comments on commit b7b2f55

Please sign in to comment.