From 51d5d4a0839ecf6fcb6e1c21d827092ef34f3fbc Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Wed, 21 Sep 2022 08:28:25 +0100 Subject: Fix `GP_UNKNOWN_EVENT` leaks in examples (#833) Most of the examples give wrong impression that `GP_UNKNOWN_EVENT` data does not need to be freed / is not heap allocated, however it's not the case - those messages are always `malloc`'d by corresponding drivers. --- examples/best-iso.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples/best-iso.c') diff --git a/examples/best-iso.c b/examples/best-iso.c index 477e272d6..a023347c3 100644 --- a/examples/best-iso.c +++ b/examples/best-iso.c @@ -302,6 +302,8 @@ camera_tether(Camera *camera, GPContext *context) { free (val); } } + + free(evtdata); } else { printf("Unknown event.\n"); } -- cgit v1.2.1