diff --git a/mfshell/mfshell.c b/mfshell/mfshell.c index 59c1fae..69190b6 100644 --- a/mfshell/mfshell.c +++ b/mfshell/mfshell.c @@ -149,6 +149,7 @@ void mfshell_destroy(mfshell * shell) free(shell->server); free(shell->local_working_dir); folder_free(shell->folder_curr); - mfconn_destroy(shell->conn); + if (shell->conn != NULL) + mfconn_destroy(shell->conn); free(shell); }