Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-01-23 05:11:40 +0300
committerGitHub <noreply@github.com>2017-01-23 05:11:40 +0300
commit5a28370d8a8945877e7537762770d1119c34bf9f (patch)
tree0dfcb3432490fb90b0f7c80c4f2c7dc11b644fc4 /scripts/launch.c
parent5c62590ba739d5960019890fe458e9b326b51993 (diff)
Fix a few cppcheck errors (#4281)
* [zlib] Fix CppCheck error "Shifting a negative value is undefined behaviour" This matches what upstream now does: https://github.com/madler/zlib/blob/2edb94a3025d288dc251bc6cbb2c02e60fbd7438/inflate.c#L1529 * [scripts] Fix CppCheck error "Memory leak: nargv" * [tests] Fix CppCheck error: "Memory leak: reference" * [aot-compiler] Fix CppCheck error: "Resource leak: infile" * [metadata] Fix CppCheck error: "Uninitialized variable: ret"
Diffstat (limited to 'scripts/launch.c')
-rw-r--r--scripts/launch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/launch.c b/scripts/launch.c
index 856f12335b3..4a1bd46b747 100644
--- a/scripts/launch.c
+++ b/scripts/launch.c
@@ -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);