diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2016-05-04 11:32:27 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2016-05-04 11:32:27 +0200 |
commit | a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1 (patch) | |
tree | 9728d0a6279be6184f1b08fc8810673f733f3856 | |
parent | e217cbe8514c8d24c1d09bc4659f4d314fab93d5 (diff) | |
download | uca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.tar.gz uca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.tar.bz2 uca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.tar.xz uca-a60b1b56fbc24b1ca60d11f27896a47c1f7ba3b1.zip |
benchmark: fix unref if camera was not instantiated
-rw-r--r-- | bin/tools/benchmark.c | 6 |
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; } |