submodule--helper: show usage for "-h"
[gitweb.git] / connect.c
index 568a35f754e41d54dc0e7133bbfaa0d1d02ccb27..cd21a1b6f725fc80e40759a8f9b26450633df6a8 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -738,8 +738,10 @@ static void handle_ssh_variant(const char *ssh_command, int is_cmdline,
                         * any longer.
                         */
                        free(ssh_argv);
-               } else
+               } else {
+                       free(p);
                        return;
+               }
        }
 
        if (!strcasecmp(variant, "plink") ||