aboutsummaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-09-27 00:55:13 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-09-27 00:55:13 +0200
commit89e9f13e12039194d9a00a39e34329f5e446774e (patch)
tree8c7be60e481657f54a5ab0e7a22d8d0e02dc8cc9 /common.c
parenta1c9018847bc93688dd89eb22eed6208aeb88876 (diff)
downloadxK-89e9f13e12039194d9a00a39e34329f5e446774e.tar.gz
xK-89e9f13e12039194d9a00a39e34329f5e446774e.tar.xz
xK-89e9f13e12039194d9a00a39e34329f5e446774e.zip
Fixes
Diffstat (limited to 'common.c')
-rw-r--r--common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common.c b/common.c
index d3c66a2..8c85b2f 100644
--- a/common.c
+++ b/common.c
@@ -422,7 +422,7 @@ str_ensure_space (struct str *self, size_t n)
}
static void
-str_append_data (struct str *self, const char *data, size_t n)
+str_append_data (struct str *self, const void *data, size_t n)
{
str_ensure_space (self, n);
memcpy (self->str + self->len, data, n);
@@ -1866,6 +1866,7 @@ read_config_file (struct str_map *config, struct error **e)
{
error_set (e, "could not open `%s' for reading: %s",
filename, strerror (errno));
+ free (filename);
return false;
}
@@ -1902,6 +1903,7 @@ read_config_file (struct str_map *config, struct error **e)
str_free (&line);
fclose (fp);
+ free (filename);
return !errors;
}