Skip to content

Commit

Permalink
lxclock: fix stupid scope error
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn committed Jan 7, 2014
1 parent 8c9c2c6 commit d745b82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/lxclock.c
Expand Up @@ -123,16 +123,16 @@ static char *lxclock_name(const char *p, const char *n)
if (ret < 0) {
/* fall back to "/tmp/" $(id -u) "/lxc/" $lxcpath / $lxcname + '\0' */
int l2 = 33 + strlen(n) + strlen(p);
char *d;
if (l2 > len) {
char *d;
d = realloc(dest, l2);
if (!d) {
free(dest);
return NULL;
}
len = l2;
dest = d;
}
dest = d;
ret = snprintf(dest, len, "/tmp/%d/lxc/%s", geteuid(), p);
if (ret < 0 || ret >= len) {
free(dest);
Expand Down

0 comments on commit d745b82

Please sign in to comment.