summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-05-04 11:32:27 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-05-04 11:32:27 +0200
commita60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1 (patch)
tree9728d0a6279be6184f1b08fc8810673f733f3856 /bin
parente217cbe8514c8d24c1d09bc4659f4d314fab93d5 (diff)
downloaduca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.tar.gz
uca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.tar.bz2
uca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.tar.xz
uca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.zip
benchmark: fix unref if camera was not instantiated
Diffstat (limited to 'bin')
-rw-r--r--bin/tools/benchmark.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/tools/benchmark.c b/bin/tools/benchmark.c
index b3a873f..f4c6c52 100644
--- a/bin/tools/benchmark.c
+++ b/bin/tools/benchmark.c
@@ -361,7 +361,7 @@ main (int argc, char *argv[])
if (!uca_camera_parse_arg_props (camera, argv, argc - 1, &error)) {
g_print ("Error setting properties: %s\n", error->message);
- goto cleanup_manager;
+ goto cleanup_camera;
}
benchmark (camera, &options);
@@ -369,9 +369,11 @@ main (int argc, char *argv[])
g_io_channel_shutdown (log_channel, TRUE, &error);
g_assert_no_error (error);
+cleanup_camera:
+ g_object_unref (camera);
+
cleanup_manager:
g_object_unref (manager);
- g_object_unref (camera);
return 0;
}