Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / scripts / launch.c
index 856f12335b32c22f3d6901a06fe0cacecdc9dfa4..4a1bd46b74718789b4b8362028d533b2abe9855c 100644 (file)
@@ -15,12 +15,14 @@ main (int argc, char *argv [])
 
        if (last == NULL){
                fprintf (stderr, "Do not know how to invoke the program given [%s]\n", argv [0]);
+               free (nargv);
                return 1;
        }
        len = strlen (last) + strlen (PROFILE_BASE_DIR) + 1;
        command = malloc (len);
        if (command == NULL){
                fprintf (stderr, "Error allocating memory");
+               free (nargv);
                return 1;
        }
        strcpy (command, PROFILE_BASE_DIR);