git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inspect: Fix memory leak of hostname.
[libguestfs.git]
/
fish
/
tilde.c
diff --git
a/fish/tilde.c
b/fish/tilde.c
index
c599e16
..
83aa70d
100644
(file)
--- a/
fish/tilde.c
+++ b/
fish/tilde.c
@@
-85,7
+85,7
@@
expand_home (const char *append)
home = getenv ("HOME");
if (!home) home = "~";
home = getenv ("HOME");
if (!home) home = "~";
- len = strlen (home) + (append ? strlen (append) : 0);
+ len = strlen (home) + (append ? strlen (append) : 0)
+ 1
;
str = malloc (len);
if (str == NULL) {
perror ("malloc");
str = malloc (len);
if (str == NULL) {
perror ("malloc");