Skip to content

Commit 940c100

Browse files
committed
session server REFACTOR simplify cleanup
1 parent 3cd1477 commit 940c100

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/session_server_ssh.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,17 @@ nc_server_ssh_get_system_keys_path(const char *username, char **out_path)
341341
}
342342

343343
if (ret) {
344-
free(path);
345344
goto cleanup;
346345
}
347346
}
348347

349348
*out_path = path;
349+
path = NULL;
350+
350351
cleanup:
351352
free(uid);
352353
free(buf);
354+
free(path);
353355
return ret;
354356
}
355357

0 commit comments

Comments
 (0)