1
1

misc: Fixed a possible memory leak.

Этот коммит содержится в:
Andreas Schneider 2010-12-27 18:08:30 +01:00
родитель 7c728acd12
Коммит a0e98f585a

Просмотреть файл

@ -576,13 +576,14 @@ char *ssh_path_expand_tilde(const char *d) {
r = malloc(ld + lh + 1);
if (r == NULL) {
SAFE_FREE(h);
return NULL;
}
if (lh > 0) {
memcpy(r, h, lh);
SAFE_FREE(h);
}
SAFE_FREE(h);
memcpy(r + lh, p, ld + 1);
return r;