summaryrefslogtreecommitdiff
path: root/examples/best-iso.c
diff options
context:
space:
mode:
authorIngvar Stepanyan <me@rreverser.com>2022-09-21 08:28:25 +0100
committerGitHub <noreply@github.com>2022-09-21 09:28:25 +0200
commit51d5d4a0839ecf6fcb6e1c21d827092ef34f3fbc (patch)
tree986ad68cf4cb77d8a35892650e440aa79f562e7f /examples/best-iso.c
parent77aad1cf4c0e48385d43cc4d1614517e1fa27979 (diff)
downloadlibgphoto2-51d5d4a0839ecf6fcb6e1c21d827092ef34f3fbc.tar.gz
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.
Diffstat (limited to 'examples/best-iso.c')
-rw-r--r--examples/best-iso.c2
1 files changed, 2 insertions, 0 deletions
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");
}