From c4b7df41a9d5d597366885f81faec4a4a1804674 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 26 Jun 2018 16:08:07 +0200 Subject: Fix even more minor leaks --- src/uca-camera.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/uca-camera.c b/src/uca-camera.c index 4a1f7f9..73ef52d 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -670,9 +670,6 @@ uca_camera_parse_arg_props (UcaCamera *camera, gchar **argv, guint argc, GError assignment = g_regex_new ("\\s*([A-Za-z0-9-]*)=(.*)\\s*", 0, 0, error); - if (*error) - return FALSE; - g_value_register_transform_func (G_TYPE_STRING, G_TYPE_UCHAR, value_transform_uchar); g_value_register_transform_func (G_TYPE_STRING, G_TYPE_INT, value_transform_int); g_value_register_transform_func (G_TYPE_STRING, G_TYPE_UINT, value_transform_uint); @@ -741,13 +738,17 @@ uca_camera_parse_arg_props (UcaCamera *camera, gchar **argv, guint argc, GError success = FALSE; } - g_match_info_free (match); g_free (prop); g_free (string_value); - if (!success) + if (!success) { + g_match_info_free (match); + g_regex_unref (assignment); return FALSE; + } } + + g_match_info_free (match); } g_regex_unref (assignment); -- cgit v1.2.3