diff options
| author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2017-07-21 12:20:43 +0200 | 
|---|---|---|
| committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2017-07-21 12:20:43 +0200 | 
| commit | f4cca41f954713acccd4ea6375ae101e27b9c189 (patch) | |
| tree | 9c5404c81c61789baf36985e54fcc2f083182614 | |
| parent | 80464f0952f34b66091d29025c1def037fd4cb15 (diff) | |
common: exit early on error
| -rw-r--r-- | bin/tools/common.c | 5 | 
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;  }  | 
