summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-07-21 12:20:43 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-07-21 12:20:43 +0200
commitf4cca41f954713acccd4ea6375ae101e27b9c189 (patch)
tree9c5404c81c61789baf36985e54fcc2f083182614 /bin
parent80464f0952f34b66091d29025c1def037fd4cb15 (diff)
downloaduca-f4cca41f954713acccd4ea6375ae101e27b9c189.tar.gz
uca-f4cca41f954713acccd4ea6375ae101e27b9c189.tar.bz2
uca-f4cca41f954713acccd4ea6375ae101e27b9c189.tar.xz
uca-f4cca41f954713acccd4ea6375ae101e27b9c189.zip
common: exit early on error
Diffstat (limited to 'bin')
-rw-r--r--bin/tools/common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/tools/common.c b/bin/tools/common.c
index c849727..b2ac943 100644
--- a/bin/tools/common.c
+++ b/bin/tools/common.c
@@ -102,6 +102,9 @@ cleanup:
camera = uca_plugin_manager_get_camerav (manager, name, n_props, params, error);
+ if (camera == NULL)
+ goto get_camera_exit;
+
uca_camera_parse_arg_props (camera, uca_prop_assignment_array, n_props, error);
for (guint i = 0; i < n_props; i++) {
@@ -109,7 +112,7 @@ cleanup:
g_free ((gchar *) params[i].name);
}
+get_camera_exit:
g_free (params);
-
return camera;
}