diff options
-rw-r--r-- | src/misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |