summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2020-01-25 18:14:16 +0100
committerMarcus Meissner <marcus@jet.franken.de>2020-01-25 18:14:16 +0100
commit8cfca5b2dd791d0b08fdf8a8dfb1a4369277575e (patch)
treeb44c017dd2674b467d1ff72426da5cdcd25b19c9
parent843c403ff88e1a9b61767324e6f4b0dfc75e8deb (diff)
downloadlibgphoto2-8cfca5b2dd791d0b08fdf8a8dfb1a4369277575e.tar.gz
fix gp_file reference count usage, its a bit weird
-rw-r--r--examples/sample-afl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/sample-afl.c b/examples/sample-afl.c
index c01414bbc..d3520c5f2 100644
--- a/examples/sample-afl.c
+++ b/examples/sample-afl.c
@@ -95,7 +95,7 @@ recursive_directory(Camera *camera, const char *folder, GPContext *context, int
printf ("Could not get file.\n");
return ret;
}
- gp_file_free (file);
+ gp_file_unref (file);
/* get preview */
gp_file_new (&file);
ret = gp_camera_file_get (camera, folder, newfile, GP_FILE_TYPE_PREVIEW, file, context);
@@ -104,7 +104,7 @@ recursive_directory(Camera *camera, const char *folder, GPContext *context, int
printf ("Could not get file preview.\n");
return ret;
}
- gp_file_free (file);
+ gp_file_unref (file);
/* get exif */
gp_file_new (&file);
ret = gp_camera_file_get (camera, folder, newfile, GP_FILE_TYPE_EXIF, file, context);
@@ -113,7 +113,7 @@ recursive_directory(Camera *camera, const char *folder, GPContext *context, int
printf ("Could not get file preview.\n");
return ret;
}
- gp_file_free (file);
+ gp_file_unref (file);
/* Trigger the ptp things */
gp_file_new (&file);
ret = gp_camera_file_get (camera, folder, newfile, GP_FILE_TYPE_METADATA, file, context);
@@ -122,7 +122,7 @@ recursive_directory(Camera *camera, const char *folder, GPContext *context, int
printf ("Could not get file metadata.\n");
return ret;
}
- gp_file_free (file);
+ gp_file_unref (file);
if (foundfile) *foundfile = 1;
gp_list_free (list);
return GP_OK;