summaryrefslogtreecommitdiff
path: root/p11-kit
diff options
context:
space:
mode:
Diffstat (limited to 'p11-kit')
-rw-r--r--p11-kit/conf.c2
-rw-r--r--p11-kit/pin.c3
-rw-r--r--p11-kit/uri.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/p11-kit/conf.c b/p11-kit/conf.c
index 0f98636..28008aa 100644
--- a/p11-kit/conf.c
+++ b/p11-kit/conf.c
@@ -169,6 +169,7 @@ read_config_file (const char* filename, int flags)
if (fread (config, 1, len, f) != len) {
error = errno;
p11_message ("couldn't read config file: %s", filename);
+ free (config);
errno = error;
return NULL;
}
@@ -559,7 +560,6 @@ load_configs_from_directory (const char *directory,
path = strconcat (directory, "/", dp->d_name, NULL);
return_val_if_fail (path != NULL, false);
- is_dir = false;
#ifdef HAVE_STRUCT_DIRENT_D_TYPE
if(dp->d_type != DT_UNKNOWN) {
is_dir = (dp->d_type == DT_DIR);
diff --git a/p11-kit/pin.c b/p11-kit/pin.c
index bb65e4c..afcb8ca 100644
--- a/p11-kit/pin.c
+++ b/p11-kit/pin.c
@@ -194,11 +194,13 @@ register_callback_unlocked (const char *pin_source,
return_val_if_fail (callbacks != NULL, false);
if (!p11_dict_set (gl.pin_sources, name, callbacks))
return_val_if_reached (false);
+ name = NULL;
}
if (!p11_array_push (callbacks, cb))
return_val_if_reached (false);
+ free (name);
return true;
}
@@ -491,7 +493,6 @@ p11_kit_pin_file_callback (const char *pin_source,
if (errno == EAGAIN)
continue;
error = errno;
- error = errno;
break;
} else if (res == 0) {
break;
diff --git a/p11-kit/uri.c b/p11-kit/uri.c
index 826c2c4..e8cb4c8 100644
--- a/p11-kit/uri.c
+++ b/p11-kit/uri.c
@@ -1236,7 +1236,6 @@ p11_kit_uri_parse (const char *string, P11KitUriType uri_type,
return P11_KIT_URI_BAD_SCHEME;
string = epos + 1;
- ret = -1;
/* Clear everything out */
memset (&uri->module, 0, sizeof (uri->module));