projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
python plugin: Check return value of cpy_unicode_or_bytes_to_string().
[collectd.git]
/
src
/
collectd.c
diff --git
a/src/collectd.c
b/src/collectd.c
index
6815ccc
..
1ccc1c0
100644
(file)
--- a/
src/collectd.c
+++ b/
src/collectd.c
@@
-182,8
+182,10
@@
static int change_basedir (const char *orig_dir)
while ((dirlen > 0) && (dir[dirlen - 1] == '/'))
dir[--dirlen] = '\0';
- if (dirlen <= 0)
+ if (dirlen <= 0) {
+ free (dir);
return (-1);
+ }
status = chdir (dir);
if (status == 0)