diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sample-afl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/sample-afl.c b/examples/sample-afl.c index 0034c02ea..faca75fee 100644 --- a/examples/sample-afl.c +++ b/examples/sample-afl.c @@ -174,11 +174,16 @@ int main(int argc, char **argv) { ret = gp_abilities_list_detect (abilities, gpinfolist, list, context); if (ret < GP_OK) return ret; + gp_port_info_list_free (gpinfolist); + gp_abilities_list_free (abilities); + fprintf(stderr, "detect list has count %d\n", gp_list_count(list)); ret = gp_list_get_name(list, 0, &name); if (ret < GP_OK) goto out; + gp_list_free (list); + ret = sample_open_camera (&camera, name, buf, context); if (ret < GP_OK) { fprintf(stderr,"camera %s at %s not found.\n", name, buf); @@ -211,6 +216,7 @@ int main(int argc, char **argv) { fprintf (stderr,"Could not get config.\n"); goto out; } + gp_widget_free (rootwidget); #endif printf ("OK, %s\n", summary.text); @@ -219,7 +225,7 @@ int main(int argc, char **argv) { printf ("Could not get storage info.\n"); goto out; } - + free(storageinfo); ret = gp_camera_trigger_capture (camera, context); if ((ret != GP_OK) && (ret != GP_ERROR_NOT_SUPPORTED)) { |